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 {
|
} else {
|
||||||
const char *response = c_simple_http_response_code_error_to_response(
|
const char *response = c_simple_http_response_code_error_to_response(
|
||||||
response_code);
|
response_code);
|
||||||
size_t response_size = strlen(response);
|
|
||||||
if (response) {
|
if (response) {
|
||||||
|
response_size = strlen(response);
|
||||||
CHECK_ERROR_WRITE(write(connection_fd, response, response_size));
|
CHECK_ERROR_WRITE(write(connection_fd, response, response_size));
|
||||||
} else {
|
} else {
|
||||||
CHECK_ERROR_WRITE(write(
|
CHECK_ERROR_WRITE(write(
|
||||||
|
|
Loading…
Reference in a new issue