]> git.kaiwu.me - njs.git/commit
Fixed access to uninitialized alg in SubtleCrypto.import().
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 12 Feb 2025 00:41:56 +0000 (16:41 -0800)
committerDmitry Volyntsev <xeioexception@gmail.com>
Wed, 19 Feb 2025 00:30:00 +0000 (16:30 -0800)
commit0b6eca0a123000297d4e18d46770bad7416d5056
treeb992416a0c7dfeef78fe5ad480cd7b00b1e173e6
parent2abc2a123fd510f6945bc94670f93db2f0aaf659
Fixed access to uninitialized alg in SubtleCrypto.import().

Found by GCC:
In function ‘qjs_import_jwk_oct’,
external/qjs_webcrypto_module.c:3116:13: error: ‘alg.start’ may be used uninitialized [-Werror=maybe-uninitialized]
 3116 |             JS_ThrowTypeError(cx, "key size and \"alg\" value \"%s\" mismatch",

The similar place in the NJS module was also fixed.
external/njs_webcrypto_module.c
external/qjs_webcrypto_module.c