Fix potential "strlen(NULL)"
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 38s
All checks were successful
Run Unit Tests / build-and-run-unit-tests (push) Successful in 38s
This commit is contained in:
parent
57c0812c24
commit
051be910f3
1 changed files with 1 additions and 1 deletions
|
@ -392,8 +392,8 @@ int main(int argc, char **argv) {
|
|||
} else {
|
||||
const char *response = c_simple_http_response_code_error_to_response(
|
||||
response_code);
|
||||
size_t response_size = strlen(response);
|
||||
if (response) {
|
||||
response_size = strlen(response);
|
||||
CHECK_ERROR_WRITE(write(connection_fd, response, response_size));
|
||||
} else {
|
||||
CHECK_ERROR_WRITE(write(
|
||||
|
|
Loading…
Reference in a new issue