+Fri Jan 2 21:21:29 1998 Tom Yu <tlyu@mit.edu>
+
+ * preauth.c (handle_sam_labels):
+ (obtain_sam_padata): Check return of malloc. [krb5-libs/518]
+
+ * chpw.c (krb5_mk_chpw_req): Check return of malloc.
+ (krb5_rd_chpw_rep): Check return of malloc. [krb5-libs/518]
+
Tue Dec 16 00:08:33 1997 Tom Yu <tlyu@mit.edu>
* mk_req_ext.c (krb5_mk_req_extended): Check enctype of session
packet->length = 6 + ap_req->length + cipherpw.length;
packet->data = (char *) malloc(packet->length);
+ if (packet->data == NULL)
+ return ENOMEM;
ptr = packet->data;
/* length */
if (result_data->length) {
result_data->data = (char *) malloc(result_data->length);
+ if (result_data->data == NULL) {
+ ret = ENOMEM;
+ goto cleanup;
+ }
memcpy(result_data->data, ptr, result_data->length);
} else {
result_data->data = NULL;
p = prompt1 = malloc(label_len + strlen(sep1) +
challenge_len + strlen(sep2) +
prompt_len+ strlen(sep3) + 1);
+ if (p == NULL)
+ return NULL;
if (challenge_len) {
strncpy(p, label, label_len); p += label_len;
strcpy(p, sep1); p += strlen(sep1);
/* encrypt passcode in key by stuffing it here */
int pcsize = 256;
char *passcode = malloc(pcsize+1);
+ if (passcode == NULL)
+ return ENOMEM;
prompt = handle_sam_labels(sam_challenge);
+ if (prompt == NULL) {
+ free(passcode);
+ return ENOMEM;
+ }
retval = krb5_read_password(context, prompt, 0, passcode, &pcsize);
free(prompt);
enc_sam_response_enc.sam_passcode.length = pcsize;
} else if (sam_challenge->sam_flags & KRB5_SAM_USE_SAD_AS_KEY) {
prompt = handle_sam_labels(sam_challenge);
+ if (prompt == NULL)
+ return ENOMEM;
retval = sam_get_pass_from_user(context, etype_info, key_proc,
key_seed, request, &sam_use_key,
prompt);