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

i.landsat.acca: Fix uninitialized variable issue in main.c #3958

Merged
merged 1 commit into from
Jul 1, 2024

Conversation

ShubhamDesai
Copy link
Contributor

@ShubhamDesai ShubhamDesai commented Jun 30, 2024

Fix uninitialized variable issue in i.landsat.acca

This pull request addresses an issue in imagery/i.landsat.acca/main.c where the variable band[i].name was uninitialized before being used. The fix involves initializing the first character of band[i].name to '\0' to ensure it is a valid string before passing it to sprintf.

Changes:

  • Initialize band[i].name before using sprintf to avoid undefined behavior.

@github-actions github-actions bot added C Related code is in C module imagery labels Jul 1, 2024
@neteler neteler added this to the 8.5.0 milestone Jul 1, 2024
@nilason nilason merged commit 939ed83 into OSGeo:main Jul 1, 2024
26 of 27 checks passed
cyliang368 pushed a commit to cyliang368/grass that referenced this pull request Jul 1, 2024
Co-authored-by: Shubham Vasudeo Desai <sdesai8@vclvm179-48.vcl.ncsu.edu>
@a0x8o a0x8o mentioned this pull request Jul 1, 2024
a0x8o pushed a commit to a0x8o/grass that referenced this pull request Jul 2, 2024
Co-authored-by: Shubham Vasudeo Desai <sdesai8@vclvm179-48.vcl.ncsu.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C Related code is in C imagery module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants