[network-manager-applet/NETWORKMANAGER_APPLET_0_7] eap: handle PEM files without an ending newline (rh #507315)



commit 3f244a8985b1fceb69e83f1b73baed40fc54274e
Author: Dan Williams <dcbw redhat com>
Date:   Mon Nov 23 12:07:17 2009 -0800

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

 src/wireless-security/eap-method.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/wireless-security/eap-method.c b/src/wireless-security/eap-method.c
index 6ab01ec..926529b 100644
--- a/src/wireless-security/eap-method.c
+++ b/src/wireless-security/eap-method.c
@@ -314,7 +314,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]