(decrypt_internal_derived): check that there's enough data
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@9622 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		| @@ -2305,12 +2305,15 @@ decrypt_internal_derived(krb5_context context, | ||||
|     struct encryption_type *et = crypto->et; | ||||
|     unsigned long l; | ||||
|      | ||||
|     checksum_sz = CHECKSUMSIZE(et->keyed_checksum); | ||||
|     if (len < checksum_sz) | ||||
| 	return EINVAL;		/* better error code? */ | ||||
|  | ||||
|     p = malloc(len); | ||||
|     if(len != 0 && p == NULL) | ||||
| 	return ENOMEM; | ||||
|     memcpy(p, data, len); | ||||
|  | ||||
|     checksum_sz = CHECKSUMSIZE(et->keyed_checksum); | ||||
|     len -= checksum_sz; | ||||
|  | ||||
|     ret = _get_derived_key(context, crypto, ENCRYPTION_USAGE(usage), &dkey); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Assar Westerlund
					Assar Westerlund