Welcome! Log In Create A New Profile

Advanced

[njs] Fixed "length" may be uninitialized in njs_typed_array_constructor().

Dmitry Volyntsev
December 27, 2019 11:18AM
details: https://hg.nginx.org/njs/rev/74d2b2074ec0
branches:
changeset: 1293:74d2b2074ec0
user: Dmitry Volyntsev <xeioex@nginx.com>
date: Fri Dec 27 19:17:26 2019 +0300
description:
Fixed "length" may be uninitialized in njs_typed_array_constructor().

Found by Clang static analyzer.

diffstat:

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

diffs (11 lines):

diff -r 025ce39e20b1 -r 74d2b2074ec0 src/njs_typed_array.c
--- a/src/njs_typed_array.c Thu Dec 26 15:31:54 2019 +0300
+++ b/src/njs_typed_array.c Fri Dec 27 19:17:26 2019 +0300
@@ -23,6 +23,7 @@ njs_typed_array_constructor(njs_vm_t *vm
njs_array_buffer_t *buffer;

size = 0;
+ length = 0;
offset = 0;

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

[njs] Fixed "length" may be uninitialized in njs_typed_array_constructor().

Dmitry Volyntsev 197 December 27, 2019 11:18AM



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

Online Users

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