mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:30:52 +01:00
[PR #2307] pipeline_cache_journal: guard null bytes/kind and avoid entry_path truncation #2315
Labels
No labels
bug
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
starred/leonida#2315
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/ubiquitarianism/leonida/pull/2307
Author: @narekshaghoyandev
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:ubiq-pipeline-journal-null-and-kind📝 Commits (1)
0791348pipeline_cache_journal: guard null bytes/kind and avoid entry_path truncation📊 Changes
2 files changed (+16 additions, -2 deletions)
View changed files
📝
runtime/src/pipeline_cache_journal.h(+5 -2)📝
runtime/test/pipeline_cache_journal_test.cpp(+11 -0)📄 Description
Fixes null-pointer dereferences and fixed-buffer truncation in
runtime/src/pipeline_cache_journal.h:Hasher::bytes(const void* data, std::size_t size)againstdata == nullptr(orsize == 0) before dereferencing.entry_path()dynamically (std::string+suffix) instead ofsnprintfinto a fixed 64-byte buffer, and default null/emptykindto"entry"so longkindnames never truncate the hex key/.binsuffix and nullkindnever triggers UB.runtime/test/pipeline_cache_journal_test.cppcovering nullHasher::bytes, nullkind, and 60-charkindinentry_path().Verification
g++ -std=c++20 -D_GLIBCXX_DEBUG -Wall -Wextra -Werror -pedanticpassedg++ -std=c++20 -fsanitize=address,undefined -Wall -Wextra -Werror -pedanticpassedubiq/mainpython3 -I scripts/check_no_game_data.py runtime/src/pipeline_cache_journal.h runtime/test/pipeline_cache_journal_test.cppcleanClaimed in the coordination issue as: RT-PIPELINE-JOURNAL-NULL-AND-KIND (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7193017383)
AI-assisted: yes (Gemini)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.