Skip to content

Conversation

@Quipyowert2
Copy link

@Quipyowert2 Quipyowert2 commented Feb 17, 2019

This patch adds field widths to scanf() calls in four C source files to prevent potential crashes that Cppcheck warns about.

Here are the warnings Cppcheck gives about scanf()/sscanf()/fscanf():

[contrib\curve.c:203]: (warning) scanf() without field width limits can crash with huge input data.
[contrib\curve.c:227]: (warning) scanf() without field width limits can crash with huge input data.
[contrib\curve.c:387]: (warning) fscanf() without field width limits can crash with huge input data.
[contrib\curve.c:535]: (warning) scanf() without field width limits can crash with huge input data.
[putt\hole.c:75]: (warning) sscanf() without field width limits can crash with huge input data.
[share\mapc.c:795]: (warning) sscanf() without field width limits can crash with huge input data.
[share\mapc.c:939]: (warning) sscanf() without field width limits can crash with huge input data.
[share\solid_base.c:907]: (warning) sscanf() without field width limits can crash with huge input data.

@Quipyowert2 Quipyowert2 force-pushed the fix-format-strings branch from b6e351e to 038288c Compare May 12, 2024 21:25
@Quipyowert2
Copy link
Author

Rebased onto master and fixed the merge conflict.

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.

1 participant