You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While minor, sending "" into the REMOVE_TRAILING_SLASHES macro will result in a buffer underflow read because of the while that does not have a bounds check.
While minor, sending "" into the REMOVE_TRAILING_SLASHES macro will result in a buffer underflow read because of the while that does not have a bounds check.
REMOVE_TRAILING_SLASHES(""):
do {
size_t _len = strlen(""); // _len = 0
while (_str[_len-1] == '/') { _str[--_len] = '\0'; } // while(_str[-1] == '/') { _str[-1] = '\0'; }
} while(0);
also is true if you give it "/" or "///" or "////////////////////////////////////////", you get it.
Change the while to be
while(_len>0 && _str[_len-1] == '/')
The text was updated successfully, but these errors were encountered: