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

Commits on Nov 13, 2024

  1. lib/vector/Vlib: Initialize variable before using it in write_sfa module

    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]>
    ymdatta committed Nov 13, 2024
    Configuration menu
    Copy the full SHA
    b2371f9 View commit details
    Browse the repository at this point in the history