Static: fixed potential undefined behavior in memcpy().
According to the C standard, pointer arguments passed to memcpy() calls shall still have valid values. NULL is considered as invalid. Found with GCC Static Analyzer.
This commit is contained in:
@@ -76,7 +76,7 @@ nxt_http_static_handler(nxt_task_t *task, nxt_http_request_t *r,
|
||||
nxt_str_set(&extension, ".html");
|
||||
|
||||
} else {
|
||||
nxt_str_null(&index);
|
||||
nxt_str_set(&index, "");
|
||||
nxt_str_null(&extension);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user