The following issues were found
shell/common/v8_value_converter.cc
1 issues
Line: 262
Column: 3
CWE codes:
120
Suggestion:
Make sure destination can always hold the source data
auto array_buffer = v8::ArrayBuffer::New(isolate, length);
std::shared_ptr<v8::BackingStore> backing_store =
array_buffer->GetBackingStore();
memcpy(backing_store->Data(), data, length);
// From this point, if something goes wrong(can't find Buffer class for
// example) we'll simply return a Uint8Array based on the created ArrayBuffer.
// This can happen if no preload script was specified to the renderer.
gin_helper::Dictionary global(isolate, context->Global());
v8::Local<v8::Value> buffer_value;
Reported by FlawFinder.
shell/renderer/electron_sandboxed_renderer_client.cc
1 issues
Line: 76
Column: 5
CWE codes:
119
120
Suggestion:
Perform bounds checking, use functions that limit length, or ensure that the size is larger than the maximum possible length
auto* mod = node::binding::get_linked_module(module_key.c_str());
if (!mod) {
char errmsg[1024];
snprintf(errmsg, sizeof(errmsg), "No such module: %s", module_key.c_str());
margs->ThrowError(errmsg);
return exports;
}
Reported by FlawFinder.