We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cebf73f commit fb0e869Copy full SHA for fb0e869
1 file changed
lib/bencode.c
@@ -698,7 +698,7 @@ static ssize_t __bencode_string(const char *s, ssize_t offset, size_t len) {
698
if (s + offset == end || end != s + pos)
699
return -2;
700
701
- if (pos + sl > len)
+ if (pos + sl >= len)
702
return -1;
703
704
return pos + sl + 1;
0 commit comments