Welcome! Log In Create A New Profile

Advanced

[PATCH] Core: improved ngx_pstrdup() error handling

August 01, 2014 07:14AM
# HG changeset patch
# User Tatsuhiko Kubo <cubicdaiya@gmail.com>
# Date 1406891054 -32400
# Fri Aug 01 20:04:14 2014 +0900
# Node ID 136ec9b0dcc48104d4f27aa2433cc78246153ef7
# Parent 428303916425d3b7eee77e7918df11bd85da2db1
Core: improved ngx_pstrdup() error handling.

diff -r 428303916425 -r 136ec9b0dcc4 src/core/ngx_conf_file.c
--- a/src/core/ngx_conf_file.c Thu Jul 31 03:52:28 2014 -0700
+++ b/src/core/ngx_conf_file.c Fri Aug 01 20:04:14 2014 +0900
@@ -781,6 +781,9 @@

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

[PATCH] Core: improved ngx_pstrdup() error handling

cubicdaiya 765 August 01, 2014 07:14AM

Re: [PATCH] Core: improved ngx_pstrdup() error handling

Maxim Dounin 350 August 01, 2014 05:54PM



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

Online Users

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