From: Tobias Brunner Date: Fri, 5 May 2017 07:01:51 +0000 (+0200) Subject: pem: Ensure a value before checking Proc-Type in PEM header X-Git-Tag: 5.5.3~26^2~4 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b72718f4b808fd6d9bd7c8ed1be0a6d593bde732;p=thirdparty%2Fstrongswan.git pem: Ensure a value before checking Proc-Type in PEM header --- diff --git a/src/libstrongswan/plugins/pem/pem_builder.c b/src/libstrongswan/plugins/pem/pem_builder.c index cda7037416..ec90fb0841 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; }