fix (kernel): fixed a potential string overflow in 'string_find_next'
This commit is contained in:
parent
1e8dc6d1db
commit
eac9754a4d
|
@ -35,7 +35,7 @@ bool string_compare(string_t a, string_t b) {
|
|||
uint32_t string_find_next(string_t string, char chr) {
|
||||
uint32_t n = 0;
|
||||
|
||||
while(*string != chr) {
|
||||
while(*string != chr && *string != '\0') {
|
||||
string++;
|
||||
n++;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue