Skip to content

Fix a buffer overflow. - #8928

Merged
seisman merged 1 commit into
masterfrom
fix-buffer-overvlow
Mar 17, 2026
Merged

seisman merged 1 commit into
masterfrom
fix-buffer-overvlow

Conversation

@joa-quim

Copy link
Copy Markdown
Member

Fix #8926

@Esteban82 Esteban82 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blindly approved. Do you want me to test it somehow?

@joa-quim

Copy link
Copy Markdown
Member Author

Don't think it's needed (and I'm not sure how to test it too). It's a safe change.

@seisman
seisman merged commit 0ad2b49 into master Mar 17, 2026
12 of 14 checks passed
@seisman
seisman deleted the fix-buffer-overvlow branch March 17, 2026 02:24
Esteban82 added a commit that referenced this pull request Nov 5, 2026
gmt_remote_dataset_id still used an unbounded sprintf in its
srtm_relief_0 branch (#8928 only bounded the else branch), so an
argument longer than PATH_MAX like @srtm_relief_0AAAA... overflowed
the stack buffer. gmt_get_filename used sscanf "%[^=?]" without a
width, smashing the stack for any file argument longer than PATH_MAX.
Also bound the sprintf/strcpy copies of the argument in gmtwhich.

Co-authored-by: Claude Opus 5.5 <[email protected]>
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.

Security : Potential memory safety issue in gmt_remote_dataset_id

3 participants