malloc. [krb5-libs/518]
* changepw.c (krb5_change_password): Check return of
malloc. [krb5-libs/518]
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10347
dc483132-0cff-0310-8789-
dd5450dbe970
+Fri Jan 2 21:28:56 1998 Tom Yu <tlyu@mit.edu>
+
+ * locate_kdc.c (krb5_locate_kdc): Check return of
+ malloc. [krb5-libs/518]
+
+ * changepw.c (krb5_change_password): Check return of
+ malloc. [krb5-libs/518]
+
Tue Dec 16 11:00:18 1997 Ezra Peisach <epeisach@mit.edu>
* locate_kdc.c (krb5_locate_kdc): Free hostlist array elements
return(KADM_NO_HOST);
addr_p = (struct sockaddr *) malloc(sizeof(struct sockaddr) * count);
+ if (addr_p == NULL)
+ return ENOMEM;
host = hostlist[0];
out = 0;
addr_p = (struct sockaddr *)
realloc ((char *)addr_p,
sizeof(struct sockaddr) * count);
+ if (addr_p == NULL)
+ return ENOMEM;
}
}
break;
#endif
addr_p = (struct sockaddr *)malloc (sizeof (struct sockaddr) * count);
+ if (addr_p == NULL)
+ return ENOMEM;
for (i=0, out=0; hostlist[i]; i++) {
host = hostlist[i];
addr_p = (struct sockaddr *)
realloc ((char *)addr_p,
sizeof(struct sockaddr) * count);
+ if (addr_p == NULL)
+ return ENOMEM;
}
if (sec_udpport && !port) {
addr_p[out] = addr_p[out-1];