opkg

statically linked package installer
git clone anongit@rnpnr.xyz:opkg.git
Log | Files | Refs | Feed | Submodules | README | LICENSE

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 ---
      7  zipinfo.c | 2 +-
      8  1 file changed, 1 insertion(+), 1 deletion(-)
      9 
     10 diff --git a/zipinfo.c b/zipinfo.c
     11 index a92bca9..5e77018 100644
     12 --- a/zipinfo.c
     13 +++ b/zipinfo.c
     14 @@ -2114,7 +2114,7 @@ static int zi_short(__G)   /* return PK-type error code */
     15              else
     16                  attribs[9] = (xattr & UNX_ISVTX)? 'T' : '-';  /* T==undefined */
     17  
     18 -            sprintf(&attribs[12], "%u.%u", hostver/10, hostver%10);
     19 +            sprintf(&attribs[11], "%2u.%u", hostver/10, hostver%10);
     20              break;
     21  
     22      } /* end switch (hostnum: external attributes format) */
     23 -- 
     24 2.20.1
     25