check length of hex-encoded IV
This commit is contained in:
@@ -288,8 +288,11 @@ static status_t pem_to_bin(chunk_t *blob, bool *pgp)
|
|||||||
" not supported", (int)dek.len, dek.ptr);
|
" not supported", (int)dek.len, dek.ptr);
|
||||||
return NOT_SUPPORTED;
|
return NOT_SUPPORTED;
|
||||||
}
|
}
|
||||||
eat_whitespace(&value);
|
if (!eat_whitespace(&value) || value.len > 2*sizeof(iv_buf))
|
||||||
iv = chunk_from_hex(value, iv.ptr);
|
{
|
||||||
|
return PARSE_ERROR;
|
||||||
|
}
|
||||||
|
iv = chunk_from_hex(value, iv_buf);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else /* state is PEM_BODY */
|
else /* state is PEM_BODY */
|
||||||
|
|||||||
Reference in New Issue
Block a user