Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
lint
  • Loading branch information
lemire committed Oct 30, 2024
commit f80d4653b26b08bc41bc3de1486741154f6616f2
6 changes: 4 additions & 2 deletions src/node_modules.cc
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,12 @@ const BindingData::PackageConfig* BindingData::GetPackageJSON(
// the string even when we are still within the capacity of the string.
// https://github.com/google/sanitizers/wiki/AddressSanitizerContainerOverflow
// https://github.com/nodejs/node/issues/55584
// The next three lines are a workaround to avoid this false positive.
// The next lines are a workaround to avoid this false positive.
size_t json_length = package_config.raw_json.size();
package_config.raw_json.append(simdjson::SIMDJSON_PADDING, ' ');
simdjson::padded_string_view json_view(package_config.raw_json.data(), json_length, package_config.raw_json.size());
simdjson::padded_string_view json_view(package_config.raw_json.data(),
json_length,
package_config.raw_json.size());
// End of workaround

simdjson::ondemand::document document;
Expand Down