From 3ab55ac65d9249e524309cbbf7afbe41e2aa33b7 Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Mon, 22 Apr 2019 17:22:21 -0600 Subject: [PATCH] bpo-9194: Fix the bounds checking in winreg.c's fixupMultiSZ() (GH-12687) (cherry picked from commit 56ed86490cb8221c874d432461d77702437f63e5) --- PC/_winreg.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PC/_winreg.c b/PC/_winreg.c index f0f8df33107bea..3b887e075334be 100644 --- a/PC/_winreg.c +++ b/PC/_winreg.c @@ -727,7 +727,7 @@ fixupMultiSZ(char **str, char *data, int len) Q = data + len; for (P = data, i = 0; P < Q && *P != '\0'; P++, i++) { str[i] = P; - for(; *P != '\0'; P++) + for (; P < Q && *P != '\0'; P++) ; } }