aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorTobias Brunner <tobias@strongswan.org>2017-05-05 09:01:51 +0200
committerTobias Brunner <tobias@strongswan.org>2017-05-23 18:29:12 +0200
commitb72718f4b808fd6d9bd7c8ed1be0a6d593bde732 (patch)
tree4b6f44e28a43ddd11831291720c59fed1bf92575 /src
parentaed77b096191f395e347c4aa00cbb7797c03d0f6 (diff)
downloadstrongswan-b72718f4b808fd6d9bd7c8ed1be0a6d593bde732.tar.bz2
strongswan-b72718f4b808fd6d9bd7c8ed1be0a6d593bde732.tar.xz
pem: Ensure a value before checking Proc-Type in PEM header
Diffstat (limited to 'src')
-rw-r--r--src/libstrongswan/plugins/pem/pem_builder.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libstrongswan/plugins/pem/pem_builder.c b/src/libstrongswan/plugins/pem/pem_builder.c
index cda703741..ec90fb084 100644
--- a/src/libstrongswan/plugins/pem/pem_builder.c
+++ b/src/libstrongswan/plugins/pem/pem_builder.c
@@ -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;
}