Skip to content

Commit e76daeb

Browse files
authored
bpo-32571: Fix reading uninitialized memory (GH-5332)
Reported by Coverity Scan.
1 parent 4112c5b commit e76daeb

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Objects/object.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -917,6 +917,11 @@ _PyObject_LookupAttr(PyObject *v, PyObject *name, PyObject **result)
917917
}
918918
*result = (*tp->tp_getattr)(v, (char *)name_str);
919919
}
920+
else {
921+
*result = NULL;
922+
return 0;
923+
}
924+
920925
if (*result != NULL) {
921926
return 1;
922927
}

0 commit comments

Comments
 (0)