MT#55283 fix off by one bug

Closes #1937

Change-Id: I9362e05165648820506eb2c95267e9a245fb32d9
(cherry picked from commit 76dd9ab56d)
mr13.3
Richard Fuchs 7 months ago
parent 93f04da0f4
commit 8277fd23c4

@ -698,7 +698,7 @@ static ssize_t __bencode_string(const char *s, ssize_t offset, size_t len) {
if (s + offset == end || end != s + pos)
return -2;
if (pos + sl > len)
if (pos + sl >= len)
return -1;
return pos + sl + 1;

Loading…
Cancel
Save