]> Kevux Git Server - fll/commit
Bugfix: the fl_string_dynamic_terminate() function is not correctly checking the...
authorKevin Day <thekevinday@gmail.com>
Tue, 29 Sep 2020 02:44:18 +0000 (21:44 -0500)
committerKevin Day <thekevinday@gmail.com>
Tue, 29 Sep 2020 02:44:18 +0000 (21:44 -0500)
commit4301803a0231d0a42bc1fc1230fa250098c01dc3
tree4c63b304fa9b81769f445c0ffe4aea06d1e02f58
parent44c055c0c55000a63b747c4ea7bcc8ea435428b5
Bugfix: the fl_string_dynamic_terminate() function is not correctly checking the NULL.

In the case of when the array is not allocated (size == 0), the terminate is still checking the string index.
This is an invalid read.

Also, the logic is revered on the string index read.
The check needs to be "!0" instead of "0".
level_1/fl_string/c/string.c