logo

oasis

Own branch of Oasis Linux (upstream: <https://git.sr.ht/~mcf/oasis/>) git clone https://anongit.hacktivis.me/git/oasis.git

0008-zipinfo.c-Do-not-crash-when-hostver-byte-is-100.patch (805B)


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