Skip to content

am: fix msgnum_sb pointer as sb use strbuf - #5

Open
GermanAizek wants to merge 2 commits into
Libre-WD-40:masterfrom
Lainports:am-msgnum-to-strbuf
Open

am: fix msgnum_sb pointer as sb use strbuf#5
GermanAizek wants to merge 2 commits into
Libre-WD-40:masterfrom
Lainports:am-msgnum-to-strbuf

Conversation

@GermanAizek

@GermanAizek GermanAizek commented Feb 9, 2026

Copy link
Copy Markdown

@metux,
This change protect pointer to a static buffer that can be overwritten by a subsequent mkpath call. Previous developers applied this to sb, which is a good practice, but forgot for msgnum_sb.

References:

This patch makes
get_pathname() return a strbuf and updates the callers to take
advantage of this. The code is simplified as we no longer need to
worry about buffer overflow.

metux and others added 2 commits February 9, 2026 16:34
Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>
This change protect pointer to a static buffer that can be overwritten by a subsequent `mkpath` call.
Previous developers applied this to sb, which is a good practice, but forgot for msgnum_sb.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants