optimize: fix potential null pointer dereference found by coverity (
#9)
568 dd("array var map: array size: %d", (int) array->nelts); 569 CID 258181 (#1 of 1): Dereference null return value (NULL_RETURNS)7. dereference: Dereferencing array_it, which is known to be NULL. 570 array_it->not_found = 0; 571 array_it->valid = 1;1 parent 353f916 commit 32188f8File tree Expand file treeCollapse file tree 1 file changedCopy full SHA for 32188f8
+3
-0
lines changedFilter options
+3
-0
lines changed +3Lines changed: 3 additions & 0 deletions Original file line number Diff line number Diff line change
@@ -553,6 +553,9 @@ ngx_http_array_var_map(ngx_http_request_t *r, ngx_str_t *res,
553
553
value = array->elts;
554
554
555
555
array_it = ngx_http_get_indexed_variable(r, conf->array_it_index);
556
+
if (array_it == NULL) {
557
+
return NGX_ERROR;
558
+
}
556
559
557
560
if (conf->in_place) {
558
561
new_array = array;
You can’t perform that action at this time.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4