Fix invalid read when checking for "_FILE" vars
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 31s
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 31s
This commit is contained in:
parent
bcb4c3c711
commit
2d215b4a4e
1 changed files with 1 additions and 1 deletions
|
@ -86,7 +86,7 @@ int c_simple_http_internal_ends_with_FILE(const char *c_string) {
|
|||
|
||||
const size_t c_string_size = strlen(c_string);
|
||||
|
||||
if (strcmp(
|
||||
if (c_string_size >= 5 && strcmp(
|
||||
comparison_string,
|
||||
c_string + (c_string_size - strlen(comparison_string)))
|
||||
== 0) {
|
||||
|
|
Loading…
Reference in a new issue