]> git.kaiwu.me - nginx.git/commitdiff
Removed zero termination of shm zone names.
authorValentin Bartenev <vbart@nginx.com>
Tue, 19 Feb 2013 17:48:45 +0000 (17:48 +0000)
committerValentin Bartenev <vbart@nginx.com>
Tue, 19 Feb 2013 17:48:45 +0000 (17:48 +0000)
It was added in r2717 and no longer needed since r2721,
where the termination was added to ngx_shm_alloc() and
ngx_init_zone_pool().  So then it only corrupts error
messages about ivalid zones.

src/http/modules/ngx_http_ssl_module.c
src/http/ngx_http_file_cache.c

index 62882838d54307c2cd1798cc161ab3b09c31332c..2fc4ad47c566e29250eeee0ab04598a221484b5a 100644 (file)
@@ -661,7 +661,6 @@ ngx_http_ssl_session_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
 
             for (j = sizeof("shared:") - 1; j < value[i].len; j++) {
                 if (value[i].data[j] == ':') {
-                    value[i].data[j] = '\0';
                     break;
                 }
 
index bd6cebadd128151708fd169ecc04af252038d9df..6d94c5034250cf733c459a9ece866a057d54233b 100644 (file)
@@ -1674,8 +1674,6 @@ ngx_http_file_cache_set_slot(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
             p = (u_char *) ngx_strchr(name.data, ':');
 
             if (p) {
-                *p = '\0';
-
                 name.len = p - name.data;
 
                 p++;