From 21c3d9ad9157ec6b138fe130dce7f6fbee986f88 Mon Sep 17 00:00:00 2001 From: Ian Moffett Date: Fri, 2 May 2025 16:32:14 -0400 Subject: Fix sizeof() against header Signed-off-by: Ian Moffett --- omar.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/omar.c b/omar.c index da2a575..dcdde45 100644 --- a/omar.c +++ b/omar.c @@ -338,7 +338,7 @@ archive_extract(void) off = 512; mkpath(namebuf); } else { - off = ALIGN_UP(sizeof(hdr) + hdr->namelen + hdr->len, BLOCK_SIZE); + off = ALIGN_UP(sizeof(*hdr) + hdr->namelen + hdr->len, BLOCK_SIZE); p = (char *)hdr + sizeof(struct omar_hdr); p += hdr->namelen; extract_single(p, hdr->len, namebuf); -- cgit v1.2.3