curses static analyzer bits
This is mostly just adding some Null guards ahead of code that was already dereferencing pointers, so there should be no change in behavior. Also adds one validation of an array index that was drawing a complaint.
This commit is contained in:
@@ -397,6 +397,7 @@ curses_str_remainder(const char *str, int width, int line_num)
|
||||
if (last_space == 0) { /* No spaces found */
|
||||
last_space = count - 1;
|
||||
}
|
||||
assert(IndexOk(last_space, substr));
|
||||
if (substr[last_space] == '\0') {
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user