summaryrefslogtreecommitdiff
path: root/PC
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-04-22 10:20:33 -0700
committerGitHub <noreply@github.com>2019-04-22 10:20:33 -0700
commit7038deed09784a03e2a7bad500f0054d29876ae7 (patch)
treecb509e598b1973e4677d0b48b6fd12cb8c7b8c7d /PC
parent5407aaf18b8d33d0a327991db366457ac6fead2d (diff)
downloadcpython-git-7038deed09784a03e2a7bad500f0054d29876ae7.tar.gz
bpo-9194: Fix the bounds checking in winreg.c's fixupMultiSZ() (GH-12687)
(cherry picked from commit 56ed86490cb8221c874d432461d77702437f63e5) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Diffstat (limited to 'PC')
-rw-r--r--PC/winreg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/PC/winreg.c b/PC/winreg.c
index e3801b257b..96dd4ef059 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++)
;
}
}