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/vector/Vlib: Initialize variable before using it in write_sfa module #4696

Closed
wants to merge 1 commit into from

Conversation

ymdatta
Copy link
Contributor

@ymdatta ymdatta commented Nov 13, 2024

In V2__add_line_to_topo_sfa function which is only compiled when HAVE_OGR or HAVE_POSTGRES is defined, first variable is used without being initialized, which is undefined behavior.

Based on the context, initialize first to TRUE, so that we first copy and then extend a box.

This was found using cppcheck tool.

In `V2__add_line_to_topo_sfa` function which is only compiled when
`HAVE_OGR` or `HAVE_POSTGRES` is defined, `first` variable is used
without being initialized, which is undefined behavior.

Based on the context, initialize `first` to `TRUE`, so that we first
copy and then extend a box.

This was found using cppcheck tool.

Signed-off-by: Mohan Yelugoti <[email protected]>
@github-actions github-actions bot added vector Related to vector data processing C Related code is in C libraries labels Nov 13, 2024
@nilason nilason added this to the 8.5.0 milestone Nov 14, 2024
neteler pushed a commit to neteler/grass that referenced this pull request Nov 14, 2024
@nilason
Copy link
Contributor

nilason commented Nov 14, 2024

This PR was merged with 91d652f, but remained open !!??
Closing manually.

@nilason nilason closed this Nov 14, 2024
@echoix
Copy link
Member

echoix commented Nov 14, 2024

Weird indeed, there's no active incident on the GitHub status page. I see the commit on main, but I didn't receive an email of the merged pull request. Was it pushed manually, not by the button in the web UI?

@echoix
Copy link
Member

echoix commented Nov 14, 2024

Weird indeed, there's no active incident on the GitHub status page. I see the commit on main, but I didn't receive an email of the merged pull request. Was it pushed manually, not by the button in the web UI? Only 3-4 people have these push permissions as override

@ymdatta
Copy link
Contributor Author

ymdatta commented Nov 14, 2024

I didn't receive any email either. I believe it was pushed manually.

Or did we hit a bug on Github? 😄

@wenzeslaus
Copy link
Member

I didn't push it.

@nilason
Copy link
Contributor

nilason commented Nov 14, 2024

I hit the merge button, but only later saw this was still open. Maybe I did it simultaneously with @neteler (who apparently is the committer)?

@neteler
Copy link
Member

neteler commented Nov 14, 2024

I didn't do anything, see my fork commit history: https://github.com/neteler/grass/commits/main/

@echoix
Copy link
Member

echoix commented Nov 15, 2024

I looked at the OSGeo gitea and the committer is GitHub, just like other PRs, unlike the pushes in releasebranch_8_4. So must be a GitHub glitch..

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 libraries vector Related to vector data processing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants