itacns: Really do not read behind the buffer bounds
Thanks oss-fuzz https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=25885
This commit is contained in:
parent
6545cd26f4
commit
595926471b
|
@ -379,7 +379,7 @@ static int hextoint(char *src, unsigned int len)
|
|||
|
||||
if(len >= sizeof(hex))
|
||||
return -1;
|
||||
strncpy(hex, src, len+1);
|
||||
strncpy(hex, src, len);
|
||||
hex[len] = '\0';
|
||||
res = strtol(hex, &end, 0x10);
|
||||
if(end != (char*)&hex[len])
|
||||
|
|
Loading…
Reference in New Issue