summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2019-04-22 23:35:55 (GMT)
committerMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2019-04-22 23:35:55 (GMT)
commit84efbaecaf50b771cc7a95fd9dd9602bd31de305 (patch)
treeb5318bc13b7f11ebd6651e09711033759876c392
parent44a2c4aaf2d0c03c70646eb16fbc6c1ba1689e69 (diff)
downloadcpython-84efbaecaf50b771cc7a95fd9dd9602bd31de305.zip
cpython-84efbaecaf50b771cc7a95fd9dd9602bd31de305.tar.gz
cpython-84efbaecaf50b771cc7a95fd9dd9602bd31de305.tar.bz2
[2.7] bpo-9194: Fix the bounds checking in winreg.c's fixupMultiSZ() (GH-12687) (GH-12916)
(cherry picked from commit 56ed86490cb8221c874d432461d77702437f63e5) https://bugs.python.org/issue9194
-rw-r--r--PC/_winreg.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/PC/_winreg.c b/PC/_winreg.c
index f0f8df3..3b887e0 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++)
;
}
}