src/http/modules/ngx_http_index_module.c:179: error: Null Dereference
  pointer `name` last assigned on line 129 could be null and is dereferenced by call to `memcpy()` at line 179, column 13.

src/http/modules/ngx_http_index_module.c:95:1: start of procedure ngx_http_index_handler()
93.  */
94. 
95. static ngx_int_t
    ^
96. ngx_http_index_handler(ngx_http_request_t *r)
97. {

src/http/modules/ngx_http_index_module.c:111:9: Taking false branch
109.     ngx_http_script_len_code_pt   lcode;
110. 
111.     if (r->uri.data[r->uri.len - 1] != '/') {
             ^
112.         return NGX_DECLINED;
113.     }

src/http/modules/ngx_http_index_module.c:115:11: Taking false branch
113.     }
114. 
115.     if (!(r->method & (NGX_HTTP_GET|NGX_HTTP_HEAD|NGX_HTTP_POST))) {
               ^
116.         return NGX_DECLINED;
117.     }

src/http/modules/ngx_http_index_module.c:119:9: Taking false branch
117.     }
118. 
119.     if (r->zero_in_uri) {
             ^
120.         return NGX_DECLINED;
121.     }

src/http/modules/ngx_http_index_module.c:123:5: 
121.     }
122. 
123.     ilcf = ngx_http_get_module_loc_conf(r, ngx_http_index_module);
         ^
124.     clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
125. 

src/http/modules/ngx_http_index_module.c:124:5: 
122. 
123.     ilcf = ngx_http_get_module_loc_conf(r, ngx_http_index_module);
124.     clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
         ^
125. 
126.     allocated = 0;

src/http/modules/ngx_http_index_module.c:126:5: 
124.     clcf = ngx_http_get_module_loc_conf(r, ngx_http_core_module);
125. 
126.     allocated = 0;
         ^
127.     root = 0;
128.     dir_tested = 0;

src/http/modules/ngx_http_index_module.c:127:5: 
125. 
126.     allocated = 0;
127.     root = 0;
         ^
128.     dir_tested = 0;
129.     name = NULL;

src/http/modules/ngx_http_index_module.c:128:5: 
126.     allocated = 0;
127.     root = 0;
128.     dir_tested = 0;
         ^
129.     name = NULL;
130.     /* suppress MSVC warning */

src/http/modules/ngx_http_index_module.c:129:5: 
127.     root = 0;
128.     dir_tested = 0;
129.     name = NULL;
         ^
130.     /* suppress MSVC warning */
131.     path.data = NULL;

src/http/modules/ngx_http_index_module.c:131:5: 
129.     name = NULL;
130.     /* suppress MSVC warning */
131.     path.data = NULL;
         ^
132. 
133.     index = ilcf->indices->elts;

src/http/modules/ngx_http_index_module.c:133:5: 
131.     path.data = NULL;
132. 
133.     index = ilcf->indices->elts;
         ^
134.     for (i = 0; i < ilcf->indices->nelts; i++) {
135. 

src/http/modules/ngx_http_index_module.c:134:10: 
132. 
133.     index = ilcf->indices->elts;
134.     for (i = 0; i < ilcf->indices->nelts; i++) {
              ^
135. 
136.         if (index[i].lengths == NULL) {

src/http/modules/ngx_http_index_module.c:134:17: Loop condition is true. Entering loop body
132. 
133.     index = ilcf->indices->elts;
134.     for (i = 0; i < ilcf->indices->nelts; i++) {
                     ^
135. 
136.         if (index[i].lengths == NULL) {

src/http/modules/ngx_http_index_module.c:136:13: Taking true branch
134.     for (i = 0; i < ilcf->indices->nelts; i++) {
135. 
136.         if (index[i].lengths == NULL) {
                 ^
137. 
138.             if (index[i].name.data[0] == '/') {

src/http/modules/ngx_http_index_module.c:138:17: Taking false branch
136.         if (index[i].lengths == NULL) {
137. 
138.             if (index[i].name.data[0] == '/') {
                     ^
139.                 return ngx_http_internal_redirect(r, &index[i].name, &r->args);
140.             }

src/http/modules/ngx_http_index_module.c:142:13: 
140.             }
141. 
142.             reserve = ilcf->max_index_len;
                 ^
143.             len = index[i].name.len;
144. 

src/http/modules/ngx_http_index_module.c:143:13: 
141. 
142.             reserve = ilcf->max_index_len;
143.             len = index[i].name.len;
                 ^
144. 
145.         } else {

src/http/modules/ngx_http_index_module.c:165:13: Taking false branch
163.         }
164. 
165.         if (reserve > allocated) {
                 ^
166. 
167.             name = ngx_http_map_uri_to_path(r, &path, &root, reserve);

src/http/modules/ngx_http_index_module.c:175:13: Taking true branch
173.         }
174. 
175.         if (index[i].values == NULL) {
                 ^
176. 
177.             /* index[i].name.len includes the terminating '\0' */

src/http/modules/ngx_http_index_module.c:179:13: 
177.             /* index[i].name.len includes the terminating '\0' */
178. 
179.             ngx_memcpy(name, index[i].name.data, index[i].name.len);
                 ^
180. 
181.             path.len = (name + index[i].name.len - 1) - path.data;
