Skip to content

fix: replace sprintf with snprintf in dxflib#359

Merged
spe-ciellt merged 1 commit intogerbv:developfrom
SourceParts:fix/dxflib-sprintf-deprecation
Mar 5, 2026
Merged

fix: replace sprintf with snprintf in dxflib#359
spe-ciellt merged 1 commit intogerbv:developfrom
SourceParts:fix/dxflib-sprintf-deprecation

Conversation

@rampageservices
Copy link
Copy Markdown
Contributor

Summary

  • Replace 3 sprintf calls with snprintf in thirdparty/dxflib/dl_writer_ascii.cpp
  • Fixes -Wdeprecated-declarations warnings on macOS where sprintf is deprecated
  • Documented as patch Fixed compilation on Fedora 34 #3 in thirdparty/dxflib/VERSION

Test plan

  • macOS CI build should have zero sprintf deprecation warnings from dxflib
  • Linux build unaffected
  • DXF export functionality unchanged (snprintf with same buffer size)

macOS deprecates sprintf in favor of snprintf, causing
-Wdeprecated-declarations warnings. Use snprintf with sizeof(buf)
for the three call sites in dl_writer_ascii.cpp.
@spe-ciellt spe-ciellt added security fix Solution for a potential problem or omission. labels Mar 5, 2026
@spe-ciellt spe-ciellt merged commit ec1b833 into gerbv:develop Mar 5, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix Solution for a potential problem or omission. security

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants