Skip to content

Commit

Permalink
bpo-32571: Fix reading uninitialized memory (GH-5332)
Browse files Browse the repository at this point in the history
Reported by Coverity Scan.
  • Loading branch information
methane authored Jan 26, 2018
1 parent 4112c5b commit e76daeb
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Objects/object.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e76daeb

Please sign in to comment.