git.samba.org
/
pam_wrapper.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
776a184
)
py: Make sure we do not dereference a NULL pointer
author
Andreas Schneider
<asn@samba.org>
Thu, 10 Dec 2015 16:30:57 +0000
(17:30 +0100)
committer
Michael Adam
<obnox@samba.org>
Thu, 10 Dec 2015 22:28:51 +0000
(23:28 +0100)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
src/python/pypamtest.c
patch
|
blob
|
history
diff --git
a/src/python/pypamtest.c
b/src/python/pypamtest.c
index 1538294c02c42270e20c8853168866fa62e091a8..e3423665b52c32bf7a8823e7117e274bc236564e 100644
(file)
--- a/
src/python/pypamtest.c
+++ b/
src/python/pypamtest.c
@@
-263,6
+263,11
@@
set_pypamtest_exception(PyObject *exc,
const char *strerr;
const struct pam_testcase *failed;
+ if (exc == NULL) {
+ PyErr_BadArgument();
+ return;
+ }
+
strerr = pamtest_strerror(perr);
if (perr == PAMTEST_ERR_CASE) {