summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-05-02 09:00:33 -0700
committerNed Deily <nad@python.org>2019-05-02 12:00:33 -0400
commitdadc34784444950c389c120fb16f44e5a29cc43f (patch)
treefe3dbf31c4f5b2c1853bdf3d8457fa3b23d34c5f
parentfbe2a1394bf52f5a4455681e1b1f705a31559585 (diff)
downloadcpython-git-dadc34784444950c389c120fb16f44e5a29cc43f.tar.gz
bpo-9194: Fix the bounds checking in winreg.c's fixupMultiSZ() (GH-12687) (GH-12910)
(cherry picked from commit 56ed86490cb8221c874d432461d77702437f63e5) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
-rw-r--r--PC/winreg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/PC/winreg.c b/PC/winreg.c
index 3fde04d746..5739cf4333 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -520,7 +520,7 @@ fixupMultiSZ(wchar_t **str, wchar_t *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++)
;
}
}