* change_password.c (krb_change_password): Use int, not KRB_INT32, for krb4
authorKen Raeburn <raeburn@mit.edu>
Tue, 25 Feb 2003 20:46:48 +0000 (20:46 +0000)
committerKen Raeburn <raeburn@mit.edu>
Tue, 25 Feb 2003 20:46:48 +0000 (20:46 +0000)
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
src/lib/krb4/change_password.c

index 1fdd1f8a0599a1b9530fd697cab4c01483ca4e63..6c7b25d206977fd3e7f4f2afd776dce24ad827fb 100644 (file)
@@ -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.
index a92351e03e2c76eb7f285e1c66ec055eef58d5e0..2dfff24753b4695da9ce93a2273c8e74c42e44cb 100644 (file)
@@ -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 */