dist/tools/tunslip: fix some minor code quality issues#21977
Merged
maribu merged 1 commit intoRIOT-OS:masterfrom Jan 12, 2026
Merged
dist/tools/tunslip: fix some minor code quality issues#21977maribu merged 1 commit intoRIOT-OS:masterfrom
maribu merged 1 commit intoRIOT-OS:masterfrom
Conversation
- drop an unused include
- drop a duplicate forward declaration
- fix some minor code style issues
- add check for being started with a command line that contains a
`/dev/tty...` device paths that is longer than 1024 chars.
- This improves UX slightly by turning a segfault on invalid input
into a proper error message
- The person starting the tool is trusted to start commands. It might
be possible to get code execution by pwning the tool via the
buffer overflow, but one would need to have code execution in
order to start the tool with a malicious command line arg...
maribu
commented
Jan 12, 2026
| in_addr_t netaddr; | ||
| in_addr_t circuit_addr; | ||
|
|
||
| int ssystem(const char *fmt, ...) __attribute__((__format__(__printf__, 1, 2))); |
Member
Author
There was a problem hiding this comment.
Here is the first declaration of ssystem(). The duplicate below is removed. This is sadly not part of what shows up in the GitHub diff.
Teufelchen1
approved these changes
Jan 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contribution description
/dev/tty...device paths that is longer than 1024 chars.Testing procedure
/dev/<very-very-very-long-path>as argument, it should now fail more gracefully than a segfaultmaster)In
masterThis PR
(Note: The
/dev/AAA[...]AAAtruncation is done manually, the actual output contained the full 4095As.)Issues/PRs references
https://seclists.org/fulldisclosure/2026/Jan/15