mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-32571: Fix reading uninitialized memory (GH-5332)
Reported by Coverity Scan.
This commit is contained in:
parent
4112c5b97d
commit
e76daebc0c
1 changed files with 5 additions and 0 deletions
|
@ -917,6 +917,11 @@ _PyObject_LookupAttr(PyObject *v, PyObject *name, PyObject **result)
|
|||
}
|
||||
*result = (*tp->tp_getattr)(v, (char *)name_str);
|
||||
}
|
||||
else {
|
||||
*result = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (*result != NULL) {
|
||||
return 1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue