diff options
Diffstat (limited to 'libopkg/sprintf_alloc.c')
-rw-r--r-- | libopkg/sprintf_alloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopkg/sprintf_alloc.c b/libopkg/sprintf_alloc.c index 8c66994..30ab033 100644 --- a/libopkg/sprintf_alloc.c +++ b/libopkg/sprintf_alloc.c @@ -44,7 +44,7 @@ int sprintf_alloc(char **str, const char *fmt, ...) /* ripped more or less straight out of PRINTF(3) */ - if ((new_str = malloc(size)) == NULL) + if ((new_str = calloc(1, size)) == NULL) return -1; *str = new_str; |