mirror of
https://github.com/nmap/nmap.git
synced 2025-12-29 10:59:02 +00:00
Avoid reading outside the provided range
This commit is contained in:
@@ -125,7 +125,7 @@ const char *string_pool_substr(const char *s, const char *t)
|
||||
}
|
||||
|
||||
const char *string_pool_substr_strip(const char *s, const char *t) {
|
||||
while (isspace((int) (unsigned char) *s))
|
||||
while (s < t && isspace((int) (unsigned char) *s))
|
||||
s++;
|
||||
while (t > s && isspace((int) (unsigned char) *(t - 1)))
|
||||
t--;
|
||||
|
||||
Reference in New Issue
Block a user