Browse Source

Fix dn_expand pointer following

Michael Forney 11 năm trước cách đây
mục cha
commit
4f6658b969
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      src/network/dn_expand.c

+ 1 - 1
src/network/dn_expand.c

@@ -10,7 +10,7 @@ int __dn_expand(const unsigned char *base, const unsigned char *end, const unsig
 	for (;;) {
 		if (*p & 0xc0) {
 			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 (j >= end-base) return -1;
 			p = base+j;