fix: unsigned overflow in string_trim
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ unsigned int string_trim(char *str) {
|
||||
start = 0;
|
||||
end = strnlen(str, STR_LEN) - 1;
|
||||
|
||||
if (end == 0) {
|
||||
if (end <= 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user