PKCS#12 PBKDF - maximum tmp buffer size

Use WC_MAX_BLOCK_SIZE - only an issue if PBKDF is using SHA-3
algorithms.
pull/2677/head
Sean Parkinson 2019-12-17 09:53:08 +10:00
parent 8d8ab655fa
commit 8d7d2c74ee
1 changed files with 1 additions and 1 deletions

View File

@ -484,7 +484,7 @@ int wc_PKCS12_PBKDF_ex(byte* output, const byte* passwd, int passLen,
else {
if (outSz > (int)v) {
/* take off MSB */
byte tmp[129];
byte tmp[WC_MAX_BLOCK_SIZE + 1];
ret = mp_to_unsigned_bin(&res, tmp);
XMEMCPY(I + i, tmp + 1, v);
}