mirror of git://git.musl-libc.org/musl
Fix dn_expand pointer following
This commit is contained in:
parent
3fd1acbfee
commit
4f6658b969
|
@ -10,7 +10,7 @@ int __dn_expand(const unsigned char *base, const unsigned char *end, const unsig
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (*p & 0xc0) {
|
if (*p & 0xc0) {
|
||||||
if (p+1==end) return -1;
|
if (p+1==end) return -1;
|
||||||
j = (p[0]&1) | p[1];
|
j = ((p[0] & 0x3f) << 8) | p[1];
|
||||||
if (len < 0) len = p+2-src;
|
if (len < 0) len = p+2-src;
|
||||||
if (j >= end-base) return -1;
|
if (j >= end-base) return -1;
|
||||||
p = base+j;
|
p = base+j;
|
||||||
|
|
Loading…
Reference in New Issue