node/test/js-native-api
Gabriel Schulhof f7724ab342
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-12 19:39:26 -07:00
..
2_function_arguments test: give js-native-api tests consistent names 2021-05-31 15:34:47 -04:00
3_callbacks test: give js-native-api tests consistent names 2021-05-31 15:34:47 -04:00
4_object_factory test: give js-native-api tests consistent names 2021-05-31 15:34:47 -04:00
5_function_factory test: give js-native-api tests consistent names 2021-05-31 15:34:47 -04:00
6_object_wrap test: give js-native-api tests consistent names 2021-05-31 15:34:47 -04:00
7_factory_wrap test: give js-native-api tests consistent names 2021-05-31 15:34:47 -04:00
8_passing_wrapped test: give js-native-api tests consistent names 2021-05-31 15:34:47 -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-17 09:11:33 +02:00
test_constructor test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_conversions test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_dataview test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_date test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_error test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_exception node-api: rtn pending excep on napi_new_instance 2021-06-11 07:24:54 +02:00
test_function test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_general test: prepare for consistent comma-dangle lint rule 2021-04-01 23:14:29 -07:00
test_handle_scope test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_instance_data test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_new_target test: give js-native-api tests consistent names 2021-05-31 15:34:47 -04:00
test_number test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_object test: prepare for consistent comma-dangle lint rule 2021-04-01 23:14:29 -07:00
test_promise test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_properties test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_reference test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_reference_double_free node-api: force env shutdown deferring behavior 2021-02-18 20:31:03 -08:00
test_string node-api: avoid crashing on passed-in null string 2021-06-12 19:39:26 -07:00
test_symbol test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
test_typedarray test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
.gitignore
common.c test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
common.h test: rename n-api to node-api 2021-02-06 05:03:38 -08:00
entry_point.c
testcfg.py