From: Ken Raeburn Date: Tue, 25 Feb 2003 20:46:48 +0000 (+0000) Subject: * change_password.c (krb_change_password): Use int, not KRB_INT32, for krb4 X-Git-Tag: krb5-1.3-alpha1~75 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1bce2d928206724865acc77e4576cf7977a4ac10;p=krb5.git * 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 --- 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 */