summaryrefslogtreecommitdiff
path: root/src/libstrongswan/plugins/pem/pem_builder.c
diff options
context:
space:
mode:
authorYves-Alexis Perez <corsac@corsac.net>2017-05-30 20:59:31 +0200
committerYves-Alexis Perez <corsac@corsac.net>2017-05-30 20:59:31 +0200
commitbba25e2ff6c4a193acb54560ea4417537bd2954e (patch)
tree9e074fe343f9ab6f5ce1e9c5142d9a6cf180fcda /src/libstrongswan/plugins/pem/pem_builder.c
parent05ddd767992d68bb38c7f16ece142e8c2e9ae016 (diff)
downloadvyos-strongswan-bba25e2ff6c4a193acb54560ea4417537bd2954e.tar.gz
vyos-strongswan-bba25e2ff6c4a193acb54560ea4417537bd2954e.zip
New upstream version 5.5.3
Diffstat (limited to 'src/libstrongswan/plugins/pem/pem_builder.c')
-rw-r--r--src/libstrongswan/plugins/pem/pem_builder.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libstrongswan/plugins/pem/pem_builder.c b/src/libstrongswan/plugins/pem/pem_builder.c
index 719a2a69e..ec90fb084 100644
--- a/src/libstrongswan/plugins/pem/pem_builder.c
+++ b/src/libstrongswan/plugins/pem/pem_builder.c
@@ -61,7 +61,7 @@ static bool find_boundary(char* tag, chunk_t *line)
if (!present("-----", line) ||
!present(tag, line) ||
- *line->ptr != ' ')
+ !line->len || *line->ptr != ' ')
{
return FALSE;
}
@@ -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;
}
@@ -306,7 +306,7 @@ static status_t pem_to_bin(chunk_t *blob, bool *pgp)
}
/* check for PGP armor checksum */
- if (*data.ptr == '=')
+ if (data.len && *data.ptr == '=')
{
*pgp = TRUE;
data.ptr++;