Welcome! Log In Create A New Profile

Advanced

[nginx] Core: improved ngx_pstrdup() error handling.

Maxim Dounin
August 01, 2014 05:52PM
details: http://hg.nginx.org/nginx/rev/f87afb46ccd2
branches:
changeset: 5784:f87afb46ccd2
user: Tatsuhiko Kubo <cubicdaiya@gmail.com>
date: Fri Aug 01 20:04:14 2014 +0900
description:
Core: improved ngx_pstrdup() error handling.

diffstat:

src/core/ngx_conf_file.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diffs (13 lines):

diff --git a/src/core/ngx_conf_file.c b/src/core/ngx_conf_file.c
--- a/src/core/ngx_conf_file.c
+++ b/src/core/ngx_conf_file.c
@@ -781,6 +781,9 @@ ngx_conf_include(ngx_conf_t *cf, ngx_com

file.len = name.len++;
file.data = ngx_pstrdup(cf->pool, &name);
+ if (file.data == NULL) {
+ return NGX_CONF_ERROR;
+ }

ngx_log_debug1(NGX_LOG_DEBUG_CORE, cf->log, 0, "include %s", file.data);


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

[nginx] Core: improved ngx_pstrdup() error handling.

Maxim Dounin 590 August 01, 2014 05:52PM



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

Online Users

Guests: 138
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