From 4d3698e4c587e5071ebedaa12daa8e86e2fcffc2 Mon Sep 17 00:00:00 2001 From: Santiago Vila Date: Sat, 15 Jun 2019 18:13:11 -0700 Subject: [PATCH] zipinfo.c: Do not crash when hostver byte is >= 100 --- zipinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zipinfo.c b/zipinfo.c index a92bca9..5e77018 100644 --- a/zipinfo.c +++ b/zipinfo.c @@ -2114,7 +2114,7 @@ static int zi_short(__G) /* return PK-type error code */ else attribs[9] = (xattr & UNX_ISVTX)? 'T' : '-'; /* T==undefined */ - sprintf(&attribs[12], "%u.%u", hostver/10, hostver%10); + sprintf(&attribs[11], "%2u.%u", hostver/10, hostver%10); break; } /* end switch (hostnum: external attributes format) */ -- 2.20.1