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

gh-120155: Fix Coverity issue in zoneinfo load_data() #120232

Merged
merged 1 commit into from
Jun 10, 2024

Commits on Jun 7, 2024

  1. pythongh-120155: Fix Coverity issue in zoneinfo load_data()

    Declare the 'rv' varaible at the top of the load_data() function to
    make sure that it's initialized before the first 'goto error' which
    uses 'rv' (return rv).
    
    Fix the Coverity issue:
    
    Error: UNINIT (CWE-457):
    Python-3.12.2/Modules/_zoneinfo.c:1233:5: skipped_decl: Jumping over declaration of ""rv"".
    Python-3.12.2/Modules/_zoneinfo.c:1284:5: uninit_use: Using uninitialized value ""rv"".
      1282|       }
      1283|
      1284|->     return rv;
      1285|   }
      1286|
    vstinner committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    fc5e471 View commit details
    Browse the repository at this point in the history