aboutsummaryrefslogtreecommitdiffstats
path: root/src/assuan-support.c
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2019-03-26 15:35:13 +0000
committerAndre Heinecke <[email protected]>2019-03-26 15:35:13 +0000
commit10576dc427b3746e2c3b9bc40efe618a3bd40519 (patch)
treecfc52ba26cf119915e21933f87d1ea1dfbe68648 /src/assuan-support.c
parentcpp: Fix GenCardKeyInteractor and extend it (diff)
downloadgpgme-10576dc427b3746e2c3b9bc40efe618a3bd40519.tar.gz
gpgme-10576dc427b3746e2c3b9bc40efe618a3bd40519.zip
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.
Diffstat (limited to 'src/assuan-support.c')
-rw-r--r--src/assuan-support.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/assuan-support.c b/src/assuan-support.c
index 3c3a3cbf..925aebaf 100644
--- a/src/assuan-support.c
+++ b/src/assuan-support.c
@@ -233,7 +233,7 @@ my_spawn (assuan_context_t ctx, pid_t *r_pid, const char *name,
err = GPG_ERR_INV_ARG;
break;
}
- logger_fd = strtoul (argv[loc], &tail, 10);
+ logger_fd = strtol (argv[loc], &tail, 10);
if (tail == argv[loc] || logger_fd <= 0)
{
err = GPG_ERR_INV_ARG;