File: loadX509PEM-fix-potential-reading-past-unterminated-.patch

package info (click to toggle)
xml-security-c 1.7.3-4%2Bdeb9u3
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 8,096 kB
  • sloc: cpp: 47,259; sh: 4,123; makefile: 503
file content (21 lines) | stat: -rw-r--r-- 669 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: =?utf-8?q?Ferenc_W=C3=A1gner?= <wferi@niif.hu>
Date: Sat, 30 Jan 2016 23:11:00 +0100
Subject: loadX509PEM: fix potential reading past unterminated buffer

---
 xsec/enc/XSECCryptoX509.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xsec/enc/XSECCryptoX509.cpp b/xsec/enc/XSECCryptoX509.cpp
index f87f746..2682e70 100644
--- a/xsec/enc/XSECCryptoX509.cpp
+++ b/xsec/enc/XSECCryptoX509.cpp
@@ -46,7 +46,7 @@ void XSECCryptoX509::loadX509PEM(const char * buf, unsigned int len) {
 		b = b1;
 	}
 
-	const char *p = strstr(buf, "-----BEGIN CERTIFICATE-----");
+	const char *p = strstr(b, "-----BEGIN CERTIFICATE-----");
 
 	if (p == NULL) {