Skip to content

Commit 4dc8779

Browse files
committed
Fix another missing OOM check (my bad v2)
1 parent 0811cb3 commit 4dc8779

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

quickjs.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57765,6 +57765,8 @@ static JSValue js_domexception_get_code(JSContext *ctx, JSValueConst this_val)
5776557765
return JS_EXCEPTION;
5776657766
if (s->code == -1) {
5776757767
name = JS_ToCStringLen(ctx, &len, s->name);
57768+
if (!name)
57769+
return JS_EXCEPTION;
5776857770
for (i = 0; i < countof(js_dom_exception_names_table); i++) {
5776957771
it = js_dom_exception_names_table[i].name;
5777057772
if (it && !strcmp(it, name) && len == strlen(it)) {

0 commit comments

Comments
 (0)