node/test/js-native-api
Gabriel Schulhof d615aeb758 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-11 09:01:22 -07:00
..
2_function_arguments test: give js-native-api tests consistent names 2021-05-19 16:43:19 -04:00
3_callbacks test: give js-native-api tests consistent names 2021-05-19 16:43:19 -04:00
4_object_factory test: give js-native-api tests consistent names 2021-05-19 16:43:19 -04:00
5_function_factory test: give js-native-api tests consistent names 2021-05-19 16:43:19 -04:00
6_object_wrap test: give js-native-api tests consistent names 2021-05-19 16:43:19 -04:00
7_factory_wrap test: give js-native-api tests consistent names 2021-05-19 16:43:19 -04:00
8_passing_wrapped test: give js-native-api tests consistent names 2021-05-19 16:43:19 -04:00
test_array test: prepare for consistent comma-dangle lint rule 2021-04-01 23:14:29 -07:00
test_bigint test: call functions internally 2021-05-07 15:17:44 -07:00
test_constructor
test_conversions
test_dataview
test_date
test_error
test_exception node-api: rtn pending excep on napi_new_instance 2021-06-04 16:38:06 -04:00
test_function
test_general test: prepare for consistent comma-dangle lint rule 2021-04-01 23:14:29 -07:00
test_handle_scope
test_instance_data
test_new_target test: give js-native-api tests consistent names 2021-05-19 16:43:19 -04:00
test_number
test_object test: prepare for consistent comma-dangle lint rule 2021-04-01 23:14:29 -07:00
test_promise
test_properties
test_reference
test_reference_double_free
test_string node-api: avoid crashing on passed-in null string 2021-06-11 09:01:22 -07:00
test_symbol
test_typedarray
.gitignore
common.c
common.h
entry_point.c
testcfg.py