[njs] WebCrypto: fixed issue introduced in 637fc26e.
noreply at nginx.com
noreply at nginx.com
Tue May 20 01:55:02 UTC 2025
details: https://github.com/nginx/njs/commit/95ea07b6553227638c9727f52dae99e94b08962a
branches: master
commit: 95ea07b6553227638c9727f52dae99e94b08962a
user: Dmitry Volyntsev <xeioex at nginx.com>
date: Mon, 19 May 2025 14:58:12 -0700
description:
WebCrypto: fixed issue introduced in 637fc26e.
Found by Clang static analyzer.
---
external/njs_webcrypto_module.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/external/njs_webcrypto_module.c b/external/njs_webcrypto_module.c
index 8d7f78e7..b9a74353 100644
--- a/external/njs_webcrypto_module.c
+++ b/external/njs_webcrypto_module.c
@@ -4852,7 +4852,8 @@ njs_algorithm_hash(njs_vm_t *vm, njs_value_t *options,
if (njs_value_is_object(options)) {
val = njs_vm_object_prop(vm, options, &string_hash, &value);
if (val == NULL) {
- return NJS_HASH_SHA256;
+ *hash = NJS_HASH_SHA256;
+ return NJS_OK;
}
} else {
More information about the nginx-devel
mailing list