Logo
Explore Help
Sign In
1berry/nodejs
1
0
Fork 0
You've already forked nodejs
Code Issues Packages Projects Releases Wiki Activity
nodejs/test/js-native-api/test_string/test_null.h

9 lines
244 B
C
Raw Permalink Normal View History

node-api: avoid crashing on passed-in null string When `napi_create_string_*` receives a null pointer as its second argument, it must null-check it before passing it into V8, otherwise a crash will occur. Signed-off-by: Gabriel Schulhof <gabrielschulhof@gmail.com> PR-URL: https://github.com/nodejs/node/pull/38923 Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Chengzhong Wu <legendecas@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-06-03 23:05:07 -07:00
#ifndef TEST_JS_NATIVE_API_TEST_STRING_TEST_NULL_H_
#define TEST_JS_NATIVE_API_TEST_STRING_TEST_NULL_H_
#include <js_native_api.h>
void init_test_null(napi_env env, napi_value exports);
#endif // TEST_JS_NATIVE_API_TEST_STRING_TEST_NULL_H_
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.8 Page: 756ms Template: 4ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API