[network-manager-openconnect] tls: handle PEM files without an ending newline (rh #507315)



commit bb312c8cc65d0363865920ae874e12d90f6e13b8
Author: Dan Williams <dcbw redhat com>
Date:   Mon Nov 23 12:09:03 2009 -0800

    tls: handle PEM files without an ending newline (rh #507315)

 properties/auth-helpers.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/properties/auth-helpers.c b/properties/auth-helpers.c
index 6e162c1..24ccdee 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -308,7 +308,7 @@ find_tag (const char *tag, const char *buf, gsize len)
 	if (len < taglen)
 		return NULL;
 
-	for (i = 0; i < len - taglen; i++) {
+	for (i = 0; i < len - taglen + 1; i++) {
 		if (memcmp (buf + i, tag, taglen) == 0)
 			return buf + i;
 	}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]