mirror of
https://github.com/ubiquitarianism/leonida.git
synced 2026-11-27 00:00:52 +01:00
[PR #2313] dev_status: guard nullptr in Builds::name() #2318
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#2318
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/2313
Author: @narekshaghoyandev
Created: 11/26/2026
Status: 🔄 Open
Base:
main← Head:ubiq-dev-status-null-name📝 Commits (1)
9ec18b2dev_status: guard nullptr in Builds::name()📊 Changes
2 files changed (+42 additions, -0 deletions)
View changed files
📝
runtime/src/dev_status.h(+4 -0)➕
runtime/test/dev_status_test.cpp(+38 -0)📄 Description
Fixes a null-pointer dereference in
leonida::dev_status::Builds::name(const char* text)(runtime/src/dev_status.h):nullptrtoBuilds::name()(or constructingBuild(nullptr)) calledstd::strlen(nullptr), causing immediate UB/SIGSEGV.if (!text)by clearingname_[0] = 0and returning early.runtime/test/dev_status_test.cpp.Verification
g++ -std=c++20 -D_GLIBCXX_DEBUG -Wall -Wextra -Werror -pedantic -Iruntime/src runtime/test/dev_status_test.cpppassedg++ -std=c++20 -fsanitize=address,undefined -Wall -Wextra -Werror -pedantic -Iruntime/src runtime/test/dev_status_test.cpppassedubiq/mainpython3 -I scripts/check_no_game_data.py runtime/src/dev_status.h runtime/test/dev_status_test.cppcleanClaimed in the coordination issue as: RT-DEV-STATUS-NULL-NAME (https://github.com/ubiquitarianism/leonida/issues/1608#issuecomment-7193761192)
AI-assisted: yes (Gemini)
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.