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:
Jeffrey Altman
2023-05-03 17:18:01 -04:00
parent 1b1ff8fdd5
commit 61dc4ff8df

View File

@@ -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;
}