Skip to content

sea: handle NUL bytes in asset keys - #64773

Open
Archkon wants to merge 1 commit into
nodejs:mainfrom
Archkon:sea3
Open

sea: handle NUL bytes in asset keys#64773
Archkon wants to merge 1 commit into
nodejs:mainfrom
Archkon:sea3

Conversation

@Archkon

@Archkon Archkon commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Construct the asset lookup string_view with the explicit Utf8Value length so embedded NUL bytes do not truncate keys.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/single-executable

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. single-executable Issues and PRs related to single-executable applications labels Jul 27, 2026
Construct the asset lookup string_view with the explicit Utf8Value
length so embedded NUL bytes do not truncate keys.

Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
@codecov

codecov Bot commented Jul 27, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.15%. Comparing base (54a5095) to head (f73674e).
⚠️ Report is 155 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64773      +/-   ##
==========================================
+ Coverage   90.14%   90.15%   +0.01%     
==========================================
  Files         744      744              
  Lines      242518   242518              
  Branches    45685    45683       -2     
==========================================
+ Hits       218611   218649      +38     
+ Misses      15396    15364      -32     
+ Partials     8511     8505       -6     
Files with missing lines Coverage Δ
src/node_sea.cc 89.53% <100.00%> (ø)

... and 24 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Archkon

Archkon commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

@avivkeller Could you apply request-ci for this ?

@avivkeller avivkeller added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Aug 5, 2026
Comment thread src/node_sea.cc
return;
}
auto it = sea_resource.assets.find(*key);
auto it = sea_resource.assets.find(std::string_view(*key, key.length()));

@avivkeller avivkeller Aug 5, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This transformation isn't going to hurt perf, right?

Just being cautious

@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Aug 5, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. needs-ci PRs that need a full CI run. single-executable Issues and PRs related to single-executable applications

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants