From 1bce2d928206724865acc77e4576cf7977a4ac10 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 25 Feb 2003 20:46:48 +0000 Subject: [PATCH] * 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 --- src/lib/krb4/ChangeLog | 6 ++++++ src/lib/krb4/change_password.c | 4 +++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/lib/krb4/ChangeLog b/src/lib/krb4/ChangeLog index 1fdd1f8a0..6c7b25d20 100644 --- a/src/lib/krb4/ChangeLog +++ b/src/lib/krb4/ChangeLog @@ -1,3 +1,9 @@ +2003-02-25 Ken Raeburn + + * 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 * Makefile.in: Update dependencies. diff --git a/src/lib/krb4/change_password.c b/src/lib/krb4/change_password.c index a92351e03..2dfff2475 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 */ -- 2.26.2