mirror of
https://github.com/lhearachel/narc.git
synced 2025-06-18 13:35:32 -04:00
fix(lib-pack): Use calloc in pack_file_copy instead of malloc
This commit is contained in:
parent
ee88a6ccc3
commit
a3ea8f0037
@ -21,7 +21,7 @@
|
||||
|
||||
void narc_pack_file_copy(struct vfs_pack_ctx *ctx, unsigned char *image, const uint32_t size)
|
||||
{
|
||||
unsigned char *copy = malloc(size);
|
||||
unsigned char *copy = calloc(size, 1);
|
||||
memcpy(copy, image, size);
|
||||
|
||||
narc_pack_file(ctx, copy, size);
|
||||
|
Loading…
Reference in New Issue
Block a user