core: Fix a strtoul to strtol

* src/assuan-support.c (my_spawn): Fix using strtoul for
a long.

--
This was commented on in129def87b262 and is correct.
It is signed here to better handle cases where an
invalid handle value (-1) would be passed.
This commit is contained in:
Andre Heinecke 2019-03-26 16:35:13 +01:00
parent ffdb75217b
commit 10576dc427
No known key found for this signature in database
GPG Key ID: 2978E9D40CBABA5C

View File

@ -233,7 +233,7 @@ my_spawn (assuan_context_t ctx, pid_t *r_pid, const char *name,
err = GPG_ERR_INV_ARG; err = GPG_ERR_INV_ARG;
break; break;
} }
logger_fd = strtoul (argv[loc], &tail, 10); logger_fd = strtol (argv[loc], &tail, 10);
if (tail == argv[loc] || logger_fd <= 0) if (tail == argv[loc] || logger_fd <= 0)
{ {
err = GPG_ERR_INV_ARG; err = GPG_ERR_INV_ARG;