diff options
author | Ken Raeburn <raeburn@mit.edu> | 2003-02-25 20:46:48 +0000 |
---|---|---|
committer | Ken Raeburn <raeburn@mit.edu> | 2003-02-25 20:46:48 +0000 |
commit | 1bce2d928206724865acc77e4576cf7977a4ac10 (patch) | |
tree | eeb3cf110f352804a406463ddd6576451a14aaa9 | |
parent | 87bea46cde4e03dd1c82ed163942679ba8539958 (diff) | |
download | krb5-1bce2d928206724865acc77e4576cf7977a4ac10.tar.gz krb5-1bce2d928206724865acc77e4576cf7977a4ac10.tar.xz krb5-1bce2d928206724865acc77e4576cf7977a4ac10.zip |
* change_password.c (krb_change_password): Use int, not KRB_INT32, for krb4
error codes. Check for malloc failure allocating sendStream.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@15202 dc483132-0cff-0310-8789-dd5450dbe970
-rw-r--r-- | src/lib/krb4/ChangeLog | 6 | ||||
-rw-r--r-- | src/lib/krb4/change_password.c | 4 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index 1fdd1f8a05..6c7b25d206 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,9 @@ +2003-02-25 Ken Raeburn <raeburn@mit.edu> + + * change_password.c (krb_change_password): Use int, not KRB_INT32, + for krb4 error codes. Check for malloc failure allocating + sendStream. + 2003-02-12 Tom Yu <tlyu@mit.edu> * Makefile.in: Update dependencies. diff --git a/src/lib/krb4/change_password.c b/src/lib/krb4/change_password.c index a92351e03e..2dfff24753 100644 --- a/src/lib/krb4/change_password.c +++ b/src/lib/krb4/change_password.c @@ -43,7 +43,7 @@ int KRB5_CALLCONV krb_change_password(char *principal, char *instance, char *realm, char *oldPassword, char *newPassword) { - KRB_INT32 err; + int err; des_cblock key; KRB_UINT32 tempKey; size_t sendSize; @@ -83,6 +83,8 @@ krb_change_password(char *principal, char *instance, char *realm, /* possible problem with vts_long on a non-multiple of four boundary */ sendSize = 0; /* start of our output packet */ sendStream = malloc(1); /* to make it reallocable */ + if (sendStream == NULL) + goto disconnect; sendStream[sendSize++] = CHANGE_PW; /* change key to stream */ |