aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRam Subramanian <ram.subramanian@getcruise.com>2024-02-21 16:35:49 -0800
committerDenis Kenzior <denkenz@gmail.com>2024-02-22 09:01:53 -0600
commit7ee32349810482a1906303af23250890f0bb946a (patch)
tree6833100040b6fb9472cc3b2a0101d689872ce4f6
parent11c1f40a77c7d9d9cf7a29ae1d91dab374e5e90c (diff)
pem: fix typo in a conditional in pem_next()
This conditional is supposed to check if there is an extra (whitespace) character after the ending boundary of the PEM. However, it does not accomplish that goal as it is written because of a typo. Fixes: f7b7c24e3d2e ("pem: make endp setting smarter")
-rw-r--r--ell/pem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ell/pem.c b/ell/pem.c
index 052e4c6a..24e83726 100644
--- a/ell/pem.c
+++ b/ell/pem.c
@@ -148,7 +148,7 @@ const char *pem_next(const void *buf, size_t buf_len, char **type_label,
*base64_len = buf_ptr - base64_data;
if (endp) {
- if (eol == buf + buf_len)
+ if (eol == buf_ptr + buf_len)
*endp = eol;
else
*endp = eol + 1;