Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/imagery: fix -Wfortify-source warning #2663

Merged
merged 1 commit into from
Nov 25, 2022

Conversation

nilason
Copy link
Contributor

@nilason nilason commented Nov 24, 2022

This addresses following warning message:

warning: 'fscanf' may overflow; destination buffer in argument 3 has size 1024, but the corresponding specifier may require size 1025

Found working on #2661.

This addresses following warning message:
warning: 'fscanf' may overflow; destination buffer in argument 3 has size 1024, but the corresponding specifier may require size 1025
Copy link
Contributor

@marisn marisn left a comment

Choose a reason for hiding this comment

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

Did I got it right – it is because title could be 1023 chars + \0 ?

@nilason
Copy link
Contributor Author

nilason commented Nov 25, 2022

Did I got it right – it is because title could be 1023 chars + \0 ?

Yes.

@nilason nilason merged commit 0162c60 into OSGeo:main Nov 25, 2022
@nilason nilason deleted the 01_lib-imag_warn branch November 25, 2022 08:51
@neteler neteler added this to the 8.3.0 milestone Feb 13, 2023
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
Addresses following compiler warning message:

warning: 'fscanf' may overflow; destination buffer in argument 3 has
size 1024, but the corresponding specifier may require size 1025
marisn pushed a commit to marisn/grass that referenced this pull request Jun 2, 2023
Addresses following compiler warning message:

warning: 'fscanf' may overflow; destination buffer in argument 3 has
size 1024, but the corresponding specifier may require size 1025
neteler pushed a commit to nilason/grass that referenced this pull request Nov 7, 2023
Addresses following compiler warning message:

warning: 'fscanf' may overflow; destination buffer in argument 3 has
size 1024, but the corresponding specifier may require size 1025
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.

None yet

3 participants