X-Git-Url: https://git.librecmc.org/?p=oweals%2Fopkg-lede.git;a=blobdiff_plain;f=libopkg%2Ffile_util.c;h=fad4178901f8f9aa47961d2131acfeaa27501830;hp=6f249a2bc656a87654502f88def8116c9f6fe87b;hb=733d8409723a397b4ced39ea7aaab8bc8b4af5d9;hpb=1cefade73444d4670d9ae7c06e8f9cc55492fd79 diff --git a/libopkg/file_util.c b/libopkg/file_util.c index 6f249a2..fad4178 100644 --- a/libopkg/file_util.c +++ b/libopkg/file_util.c @@ -143,7 +143,7 @@ char *file_md5sum_alloc(const char *file_name) char *md5sum_hex; unsigned char md5sum_bin[md5sum_bin_len]; - md5sum_hex = malloc(md5sum_hex_len + 1); + md5sum_hex = calloc(1, md5sum_hex_len + 1); if (md5sum_hex == NULL) { fprintf(stderr, "%s: out of memory\n", __FUNCTION__); return strdup("");