krb5: fixup crypto.c avoid realloc to trim memory allocation
1b1ff8fdd5
("krb5: crypto.c avoid realloc
to trim memory allocation") removed the realloc() but failed to assign
'p' to 'result->data'.
This commit is contained in:
@@ -1275,6 +1275,7 @@ decrypt_internal_derived(krb5_context context,
|
||||
}
|
||||
l = len - et->confoundersize;
|
||||
memmove(p, p + et->confoundersize, l);
|
||||
result->data = p;
|
||||
result->length = l;
|
||||
return 0;
|
||||
}
|
||||
@@ -1355,6 +1356,7 @@ decrypt_internal_enc_then_cksum(krb5_context context,
|
||||
|
||||
l = len - et->confoundersize;
|
||||
memmove(p, p + et->blocksize + et->confoundersize, l);
|
||||
result->data = p;
|
||||
result->length = l;
|
||||
return 0;
|
||||
}
|
||||
@@ -1416,6 +1418,7 @@ decrypt_internal(krb5_context context,
|
||||
}
|
||||
l = len - et->confoundersize - checksum_sz;
|
||||
memmove(p, p + et->confoundersize + checksum_sz, l);
|
||||
result->data = p;
|
||||
result->length = l;
|
||||
return 0;
|
||||
}
|
||||
@@ -1458,6 +1461,7 @@ decrypt_internal_special(krb5_context context,
|
||||
}
|
||||
|
||||
memmove (p, p + cksum_sz + et->confoundersize, sz);
|
||||
result->data = p;
|
||||
result->length = sz;
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user