From b4931cb618a2b4d22482694cbc40e60990d684fc Mon Sep 17 00:00:00 2001 From: Gaspartcho <93390411+Gaspartcho@users.noreply.github.com> Date: Sun, 25 Feb 2024 23:23:28 +0100 Subject: hopefully fixed the memory leak (#83) --- lib/microtar/src/microtar.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib/microtar') diff --git a/lib/microtar/src/microtar.c b/lib/microtar/src/microtar.c index 1cd9920..20c509d 100644 --- a/lib/microtar/src/microtar.c +++ b/lib/microtar/src/microtar.c @@ -337,8 +337,9 @@ int mtar_clear_header(mtar_header_t *h){ h->size = 0; h->mtime = 0; h->type = 0; - bzero(h->name, strlen(h->name)); - bzero(h->linkname, strlen(h->linkname)); + + bzero(h->name, sizeof(h->name)); + bzero(h->linkname, sizeof(h->linkname)); return MTAR_ESUCCESS; } -- cgit v1.2.3