From: Marcus Brinkmann Date: Tue, 15 Dec 2009 01:01:40 +0000 (+0000) Subject: 2009-12-15 Marcus Brinkmann X-Git-Tag: gpgme-1.3.0~7 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1094c0a5d351953c26cb73196e79735c70f82112;p=gpgme.git 2009-12-15 Marcus Brinkmann * assuan-support.c (my_spawn): Calloc, not malloc, the fd_items. --- diff --git a/src/ChangeLog b/src/ChangeLog index 61bc394..98de853 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2009-12-15 Marcus Brinkmann + + * assuan-support.c (my_spawn): Calloc, not malloc, the fd_items. + 2009-12-10 Werner Koch * debug.c (debug_init): Test on sgid process. diff --git a/src/assuan-support.c b/src/assuan-support.c index d5defa8..c4d390c 100644 --- a/src/assuan-support.c +++ b/src/assuan-support.c @@ -130,7 +130,7 @@ my_spawn (assuan_context_t ctx, pid_t *r_pid, const char *name, } /* fd_in, fd_out, terminator */ i += 3; - fd_items = malloc (sizeof (struct spawn_fd_item_s) * i); + fd_items = calloc (i, sizeof (struct spawn_fd_item_s)); if (! fd_items) return -1; i = 0;