projects
/
krb5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2873d90
)
Check for malloc failure
author
Ken Raeburn
<raeburn@mit.edu>
Wed, 6 Aug 2008 16:41:50 +0000
(16:41 +0000)
committer
Ken Raeburn
<raeburn@mit.edu>
Wed, 6 Aug 2008 16:41:50 +0000
(16:41 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@20615
dc483132
-0cff-0310-8789-
dd5450dbe970
src/kadmin/server/schpw.c
patch
|
blob
|
history
diff --git
a/src/kadmin/server/schpw.c
b/src/kadmin/server/schpw.c
index 9e1113a5920ce1310807ca449ee9e01a101d524b..76aa2ca8525643f0e71f40d54a5241178bc2e9fa 100644
(file)
--- a/
src/kadmin/server/schpw.c
+++ b/
src/kadmin/server/schpw.c
@@
-363,6
+363,11
@@
chpwfail:
rep->length = 6 + ap_rep.length + cipher.length;
rep->data = (char *) malloc(rep->length);
+ if (rep->data == NULL) {
+ rep->length = 0; /* checked by caller */
+ ret = ENOMEM;
+ goto bailout;
+ }
ptr = rep->data;
/* length */