-
-
Notifications
You must be signed in to change notification settings - Fork 30.7k
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
minor NULL pointer and sign issues reported by Coverity #85228
Labels
3.8 (EOL)
end of life
3.9
only security fixes
3.10
only security fixes
type-crash
A hard crash of the interpreter, possibly with a core dump
Comments
________________________________________________________________________________________________________
*** CID 1464693: Null pointer dereferences (REVERSE_INULL)
/Modules/_zoneinfo.c: 1625 in parse_abbr()
1619 ptr++;
1620 }
1621 str_end = ptr;
1622 }
1623
1624 *abbr = PyUnicode_FromStringAndSize(str_start, str_end - str_start);
>>> CID 1464693: Null pointer dereferences (REVERSE_INULL)
>>> Null-checking "abbr" suggests that it may be null, but it has already been dereferenced on all paths leading to the check.
1625 if (abbr == NULL) {
1626 return -1;
1627 }
1628
1629 return ptr - p;
1630 }
________________________________________________________________________________________________________
*** CID 1464687: Null pointer dereferences (FORWARD_NULL)
/Modules/_ssl/debughelpers.c: 138 in _PySSL_keylog_callback()
132 * critical debug helper.
133 */
134 if (lock == NULL) {
135 lock = PyThread_allocate_lock();
136 if (lock == NULL) {
137 PyErr_SetString(PyExc_MemoryError, "Unable to allocate lock");
>>> CID 1464687: Null pointer dereferences (FORWARD_NULL)
>>> Passing null pointer "&ssl_obj->exc_type" to "PyErr_Fetch", which dereferences it.
138 PyErr_Fetch(&ssl_obj->exc_type, &ssl_obj->exc_value,
139 &ssl_obj->exc_tb);
140 return;
141 }
142 }
143
________________________________________________________________________________________________________
*** CID 1464684: Integer handling issues (NEGATIVE_RETURNS)
/Modules/clinic/posixmodule.c.h: 6813 in os_fpathconf()
6807 if (fd == -1 && PyErr_Occurred()) {
6808 goto exit;
6809 }
6810 if (!conv_path_confname(args[1], &name)) {
6811 goto exit;
6812 }
>>> CID 1464684: Integer handling issues (NEGATIVE_RETURNS)
>>> "fd" is passed to a parameter that cannot be negative.
6813 _return_value = os_fpathconf_impl(module, fd, name);
6814 if ((_return_value == -1) && PyErr_Occurred()) {
6815 goto exit;
6816 }
6817 return_value = PyLong_FromLong(_return_value);
6818 |
gpshead
added
3.8 (EOL)
end of life
3.9
only security fixes
3.10
only security fixes
labels
Jun 20, 2020
gpshead
added
type-crash
A hard crash of the interpreter, possibly with a core dump
3.8 (EOL)
end of life
3.9
only security fixes
3.10
only security fixes
labels
Jun 20, 2020
gpshead
added
the
type-crash
A hard crash of the interpreter, possibly with a core dump
label
Jun 20, 2020
those were the three in the email (20 of 106), i need to figure out how to login to coverity again to see the rest. |
I figured out how to run coverity scan builds again. It turned out the tool chain doesn't like GCC 10. clang 10 works, though. By the way I'm using login with Github. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
3.8 (EOL)
end of life
3.9
only security fixes
3.10
only security fixes
type-crash
A hard crash of the interpreter, possibly with a core dump
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: