Anonymous User
March 18, 2013 03:16AM
Author: ru
Date: 2013-03-18 07:13:57 +0000 (Mon, 18 Mar 2013)
New Revision: 5117
URL: http://trac.nginx.org/nginx/changeset/5117/nginx

Log:
Core: guard against failed allocation during binary upgrade.

Patch by Piotr Sikora.


Modified:
trunk/src/core/nginx.c

Modified: trunk/src/core/nginx.c
===================================================================
--- trunk/src/core/nginx.c 2013-03-15 20:00:49 UTC (rev 5116)
+++ trunk/src/core/nginx.c 2013-03-18 07:13:57 UTC (rev 5117)
@@ -594,6 +594,9 @@
var = ngx_alloc(sizeof(NGINX_VAR)
+ cycle->listening.nelts * (NGX_INT32_LEN + 1) + 2,
cycle->log);
+ if (var == NULL) {
+ return NGX_INVALID_PID;
+ }

p = ngx_cpymem(var, NGINX_VAR "=", sizeof(NGINX_VAR));


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

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

Anonymous User 687 March 18, 2013 03:16AM



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

Online Users

Guests: 212
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready