[njs] Fixed use-of-uninitialized-value introduced in beb180165976.
Dmitry Volyntsev
xeioex at nginx.com
Tue May 24 05:27:38 UTC 2022
details: https://hg.nginx.org/njs/rev/98959158fe23
branches:
changeset: 1862:98959158fe23
user: Dmitry Volyntsev <xeioex at nginx.com>
date: Mon May 23 22:26:50 2022 -0700
description:
Fixed use-of-uninitialized-value introduced in beb180165976.
Found by Memory Sanitizer.
diffstat:
src/njs_object.h | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diffs (17 lines):
diff -r f37972e95e17 -r 98959158fe23 src/njs_object.h
--- a/src/njs_object.h Mon May 23 22:26:35 2022 -0700
+++ b/src/njs_object.h Mon May 23 22:26:50 2022 -0700
@@ -88,9 +88,10 @@ njs_int_t njs_object_prop_init(njs_vm_t
njs_inline njs_bool_t
njs_is_data_descriptor(njs_object_prop_t *prop)
{
- return njs_is_valid(&prop->value) ||
- prop->writable != NJS_ATTRIBUTE_UNSET ||
- prop->type == NJS_PROPERTY_HANDLER;
+ return prop->writable != NJS_ATTRIBUTE_UNSET
+ || njs_is_valid(&prop->value)
+ || prop->type == NJS_PROPERTY_HANDLER;
+
}
More information about the nginx-devel
mailing list