pem: Ensure a value before checking Proc-Type in PEM header

This commit is contained in:
Tobias Brunner
2017-05-23 18:29:12 +02:00
parent aed77b0961
commit b72718f4b8
+1 -1
View File
@@ -250,7 +250,7 @@ static status_t pem_to_bin(chunk_t *blob, bool *pgp)
{
continue;
}
if (match("Proc-Type", &name) && *value.ptr == '4')
if (match("Proc-Type", &name) && value.len && *value.ptr == '4')
{
encrypted = TRUE;
}