Undefined behaviour in signal_shutdown()
Open
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 11
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
There are possible scenarios in which printf("%s", NULL) could be invoked. (See https://github.com/openwrt/procd/blob/1e5c40e07928ab6de57ee1811945944ccb4f1907/signal.c#L36)
This is undefined behaviour which should be avoided.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in signal.c at signal_shutdown(), especially the printf("%s", NULL) path identified near line 36. Trace how the function can receive a NULL value and verify that shutdown handling no longer invokes printf with NULL while preserving the existing signal behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100