check that num_data >= 0
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24079 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -3162,6 +3162,11 @@ krb5_encrypt_iov_ivec(krb5_context context,
|
||||
const struct encryption_type *et = crypto->et;
|
||||
krb5_crypto_iov *tiv, *piv, *hiv;
|
||||
|
||||
if (num_data < 0) {
|
||||
krb5_clear_error_message(context);
|
||||
return KRB5_CRYPTO_INTERNAL;
|
||||
}
|
||||
|
||||
if(!derived_crypto(context, crypto)) {
|
||||
krb5_clear_error_message(context);
|
||||
return KRB5_CRYPTO_INTERNAL;
|
||||
@@ -3363,6 +3368,11 @@ krb5_decrypt_iov_ivec(krb5_context context,
|
||||
struct encryption_type *et = crypto->et;
|
||||
krb5_crypto_iov *tiv, *hiv;
|
||||
|
||||
if (num_data < 0) {
|
||||
krb5_clear_error_message(context);
|
||||
return KRB5_CRYPTO_INTERNAL;
|
||||
}
|
||||
|
||||
if(!derived_crypto(context, crypto)) {
|
||||
krb5_clear_error_message(context);
|
||||
return KRB5_CRYPTO_INTERNAL;
|
||||
@@ -3518,6 +3528,11 @@ krb5_create_checksum_iov(krb5_context context,
|
||||
size_t len;
|
||||
char *p, *q;
|
||||
|
||||
if (num_data < 0) {
|
||||
krb5_clear_error_message(context);
|
||||
return KRB5_CRYPTO_INTERNAL;
|
||||
}
|
||||
|
||||
if(!derived_crypto(context, crypto)) {
|
||||
krb5_clear_error_message(context);
|
||||
return KRB5_CRYPTO_INTERNAL;
|
||||
|
Reference in New Issue
Block a user