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