| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent bb8b11f commit 808a456
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -133,7 +133,7 @@ void WASI::New(const FunctionCallbackInfo<Value>& args) { | |||
| 133 | 133 | Local<Array> preopens = args[2].As<Array>(); | |
| 134 | 134 | CHECK_EQ(preopens->Length() % 2, 0); | |
| 135 | 135 | options.preopenc = preopens->Length() / 2; | |
| 136 | - options.preopens = UncheckedCalloc<uvwasi_preopen_t>(options.preopenc); | ||
| 136 | + options.preopens = Calloc<uvwasi_preopen_t>(options.preopenc); | ||
| 137 | 137 | int index = 0; | |
| 138 | 138 | for (uint32_t i = 0; i < preopens->Length(); i += 2) { | |
| 139 | 139 | auto mapped = preopens->Get(context, i).ToLocalChecked(); | |
@@ -143,7 +143,9 @@ void WASI::New(const FunctionCallbackInfo<Value>& args) { | |||
| 143 | 143 | node::Utf8Value mapped_path(env->isolate(), mapped); | |
| 144 | 144 | node::Utf8Value real_path(env->isolate(), real); | |
| 145 | 145 | options.preopens[index].mapped_path = strdup(*mapped_path); | |
| 146 | + CHECK_NOT_NULL(options.preopens[index].mapped_path); | ||
| 146 | 147 | options.preopens[index].real_path = strdup(*real_path); | |
| 148 | + CHECK_NOT_NULL(options.preopens[index].real_path); | ||
| 147 | 149 | index++; | |
| 148 | 150 | } | |
| 149 | 151 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments