OSGeo / grass

GRASS GIS - free and open-source geospatial processing engine
https://grass.osgeo.org
Other
855 stars 310 forks source link

lib/vector/Vlib: Initialize variable before using it in write_sfa module #4696

Closed ymdatta closed 1 week ago

ymdatta commented 1 week ago

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.

nilason commented 1 week ago

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

echoix commented 1 week ago

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 commented 1 week ago

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 commented 1 week ago

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

Or did we hit a bug on Github? 😄

wenzeslaus commented 1 week ago

I didn't push it.

nilason commented 1 week ago

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 commented 1 week ago

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

echoix commented 1 week ago

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..