Skip to content

Commit a7cbcc3

Browse files
committed
Fix solv_zchunk decoding error if large chunks are used
Oops. This commit is a bit embarassing.
1 parent 0c493f9 commit a7cbcc3

2 files changed

Lines changed: 8 additions & 2 deletions

File tree

ext/solv_zchunk.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ getuint(unsigned char *p, unsigned char *endp, unsigned int *dp)
7575
}
7676
if (++p < endp && (*p & 0x80) != 0)
7777
{
78-
*dp = p[-3] ^ (p[-2] << 7) ^ (p[1] << 14) ^ ((p[0] ^ 0x80) << 21);
78+
*dp = p[-3] ^ (p[-2] << 7) ^ (p[-1] << 14) ^ ((p[0] ^ 0x80) << 21);
7979
return p + 1;
8080
}
8181
if (++p < endp && (*p & 0xf0) == 0x80)
8282
{
83-
*dp = p[-4] ^ (p[-3] << 7) ^ (p[2] << 14) ^ (p[1] << 21) ^ ((p[0] ^ 0x80) << 28);
83+
*dp = p[-4] ^ (p[-3] << 7) ^ (p[-2] << 14) ^ (p[-1] << 21) ^ ((p[0] ^ 0x80) << 28);
8484
return p + 1;
8585
}
8686
return 0;

package/libsolv.changes

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
-------------------------------------------------------------------
2+
Thu Dec 19 16:29:52 CET 2019 - [email protected]
3+
4+
- fix solv_zchunk decoding error if large chunks are used
5+
[bnc#1159314]
6+
17
-------------------------------------------------------------------
28
Tue Dec 10 21:02:31 CET 2019 - [email protected]
39

0 commit comments

Comments
 (0)