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



commit 00139ba0f41143fb1050de894bd5eea6739b3c42
Author: Dan Williams <dcbw redhat com>
Date:   Mon Nov 23 12:10:24 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 0fd2e10..28001a3 100644
--- a/properties/auth-helpers.c
+++ b/properties/auth-helpers.c
@@ -613,7 +613,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]