Welcome! Log In Create A New Profile

Advanced

[njs] Silenced Coverity false-positive NULL-pointer dereference warning.

Dmitry Volyntsev
July 07, 2020 08:26AM
details: https://hg.nginx.org/njs/rev/ceb8f0dcf48b
branches:
changeset: 1454:ceb8f0dcf48b
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Tue Jul 07 12:23:44 2020 +0000
description:
Silenced Coverity false-positive NULL-pointer dereference warning.

Found by Coverity (CID 1463869).

diffstat:

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

diffs (13 lines):

diff -r 7a8e3f0d52a6 -r ceb8f0dcf48b src/njs_parser.c
--- a/src/njs_parser.c Tue Jul 07 12:23:42 2020 +0000
+++ b/src/njs_parser.c Tue Jul 07 12:23:44 2020 +0000
@@ -1799,6 +1799,9 @@ njs_parser_property_name(njs_parser_t *p

if (consume > 1) {
token = njs_lexer_token(parser->lexer, 0);
+ if (token == NULL) {
+ return NJS_ERROR;
+ }

property = njs_parser_property_name_node(parser, token);
if (property == NULL) {
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx-devel
Subject Author Views Posted

[njs] Silenced Coverity false-positive NULL-pointer dereference warning.

Dmitry Volyntsev 62 July 07, 2020 08:26AM



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

Online Users

Guests: 108
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready