Welcome! Log In Create A New Profile

Advanced

[nginx] svn commit: r4690 - trunk/src/core

Anonymous User
June 18, 2012 10:08AM
Author: mdounin
Date: 2012-06-18 14:06:00 +0000 (Mon, 18 Jun 2012)
New Revision: 4690
URL: http://trac.nginx.org/nginx/changeset/4690/nginx

Log:
Fixed handling of conflicting wildcard server names.

With previous code wildcard names were added to hash even if conflict
was detected. This resulted in identical names in hash and segfault
later in ngx_hash_wildcard_init().


Modified:
trunk/src/core/ngx_hash.c

Modified: trunk/src/core/ngx_hash.c
===================================================================
--- trunk/src/core/ngx_hash.c 2012-06-18 14:02:20 UTC (rev 4689)
+++ trunk/src/core/ngx_hash.c 2012-06-18 14:06:00 UTC (rev 4690)
@@ -924,17 +924,6 @@
}


- hk = ngx_array_push(hwc);
- if (hk == NULL) {
- return NGX_ERROR;
- }
-
- hk->key.len = last - 1;
- hk->key.data = p;
- hk->key_hash = 0;
- hk->value = value;
-
-
/* check conflicts in wildcard hash */

name = keys->elts;
@@ -972,5 +961,18 @@

ngx_memcpy(name->data, key->data + skip, name->len);

+
+ /* add to wildcard hash */
+
+ hk = ngx_array_push(hwc);
+ if (hk == NULL) {
+ return NGX_ERROR;
+ }
+
+ hk->key.len = last - 1;
+ hk->key.data = p;
+ hk->key_hash = 0;
+ hk->value = value;
+
return NGX_OK;
}

_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[nginx] svn commit: r4690 - trunk/src/core

Anonymous User 947 June 18, 2012 10:08AM



Sorry, you do not have permission to post/reply in this forum.

Online Users

Guests: 238
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready