Compare commits

...

2 Commits

Author SHA1 Message Date
Renáta Hodován
8c11e13098
Merge ab2c449585ae457768a8449d877846fe7547f033 into 20d2b404af65edc5d66ee6f11a59f930ea3d1b88 2025-08-29 18:06:19 +08:00
Renata Hodovan
ab2c449585 Ensure not creating a worker with non-existing module
Fixes #298.
2024-07-23 20:09:33 +02:00

View File

@ -3677,7 +3677,8 @@ static JSValue js_worker_ctor(JSContext *ctx, JSValueConst new_target,
/* module name */
filename = JS_ToCString(ctx, argv[0]);
if (!filename)
struct stat buffer;
if (!filename || stat(filename, &buffer) != 0)
goto fail;
args = malloc(sizeof(*args));