[nginx] svn commit: r4557 - trunk/src/core
mdounin at mdounin.ru
mdounin at mdounin.ru
Thu Mar 22 11:57:19 UTC 2012
Author: mdounin
Date: 2012-03-22 11:57:18 +0000 (Thu, 22 Mar 2012)
New Revision: 4557
URL: http://trac.nginx.org/nginx/changeset/4557/nginx
Log:
Resolver: added missing sanity checking when creating name queries.
Found by Veracode.
Modified:
trunk/src/core/ngx_resolver.c
Modified: trunk/src/core/ngx_resolver.c
===================================================================
--- trunk/src/core/ngx_resolver.c 2012-03-22 10:45:08 UTC (rev 4556)
+++ trunk/src/core/ngx_resolver.c 2012-03-22 11:57:18 UTC (rev 4557)
@@ -1840,7 +1840,7 @@
len++;
} else {
- if (len == 0) {
+ if (len == 0 || len > 255) {
return NGX_DECLINED;
}
@@ -1851,6 +1851,10 @@
p--;
}
+ if (len == 0 || len > 255) {
+ return NGX_DECLINED;
+ }
+
*p = (u_char) len;
return NGX_OK;
More information about the nginx-devel
mailing list