]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Fix solv_zchunk decoding error if large chunks are used
authorMichael Schroeder <mls@suse.de>
Thu, 19 Dec 2019 15:28:38 +0000 (16:28 +0100)
committerMichael Schroeder <mls@suse.de>
Thu, 19 Dec 2019 15:31:09 +0000 (16:31 +0100)
Oops. This commit is a bit embarassing.

ext/solv_zchunk.c
package/libsolv.changes

index 664b739b90de0cecb6c5663b0470b4240ccf43f7..ba3d79470748ffb70ab0f770b05836a5d95c7a6a 100644 (file)
@@ -75,12 +75,12 @@ getuint(unsigned char *p, unsigned char *endp, unsigned int *dp)
     }
   if (++p < endp && (*p & 0x80) != 0)
     {
-      *dp = p[-3] ^ (p[-2] << 7) ^ (p[1] << 14) ^ ((p[0] ^ 0x80) << 21);
+      *dp = p[-3] ^ (p[-2] << 7) ^ (p[-1] << 14) ^ ((p[0] ^ 0x80) << 21);
       return p + 1;
     }
   if (++p < endp && (*p & 0xf0) == 0x80)
     {
-      *dp = p[-4] ^ (p[-3] << 7) ^ (p[2] << 14) ^ (p[1] << 21) ^ ((p[0] ^ 0x80) << 28);
+      *dp = p[-4] ^ (p[-3] << 7) ^ (p[-2] << 14) ^ (p[-1] << 21) ^ ((p[0] ^ 0x80) << 28);
       return p + 1;
     }
   return 0;
index c8af86b714643f6cffab24c877cb2fa30a2bbd41..dfca0c5ff3b1f82ccd73e75d924faa6c12c42858 100644 (file)
@@ -1,3 +1,9 @@
+-------------------------------------------------------------------
+Thu Dec 19 16:29:52 CET 2019 - mls@suse.de
+
+- fix solv_zchunk decoding error if large chunks are used
+  [bnc#1159314]
+
 -------------------------------------------------------------------
 Tue Dec 10 21:02:31 CET 2019 - mls@suse.de