diff options
| author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-06-10 10:12:25 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-10 10:12:25 (GMT) |
| commit | ff980e3f7a8fab768148cf09aad40c20e05eb126 (patch) | |
| tree | c4046252b872664d892583f386b788ca18ddb98c /Python/Python-tokenize.c | |
| parent | 82c93ea55a71e7cae160e749b93f91cf89bb562f (diff) | |
| download | cpython-ff980e3f7a8fab768148cf09aad40c20e05eb126.zip cpython-ff980e3f7a8fab768148cf09aad40c20e05eb126.tar.gz cpython-ff980e3f7a8fab768148cf09aad40c20e05eb126.tar.bz2 | |
[3.12] gh-120155: Fix Coverity issue in zoneinfo load_data() (GH-120232) (#120311)
gh-120155: Fix Coverity issue in zoneinfo load_data() (GH-120232)
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|
(cherry picked from commit b90bd3e5bbc136f53b24ee791824acd6b17e0d42)
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Python/Python-tokenize.c')
0 files changed, 0 insertions, 0 deletions
