ip/torrent: fix size check in 64-bit "v" unpack (thanks pr)
This commit is contained in:
parent
86a77e5088
commit
7c3477cb61
1 changed files with 1 additions and 1 deletions
|
@ -295,7 +295,7 @@ unpack(uchar *s, int n, char *fmt, ...)
|
|||
s += 4;
|
||||
break;
|
||||
case 'v':
|
||||
if(s+4 > e) goto Err;
|
||||
if(s+8 > e) goto Err;
|
||||
*va_arg(arg, vlong*) =
|
||||
(vlong)s[0]<<56 |
|
||||
(vlong)s[1]<<48 |
|
||||
|
|
Loading…
Reference in a new issue