summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
authorZackery Spytz <zspytz@gmail.com>2019-04-22 17:01:32 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2019-04-22 17:01:32 (GMT)
commit56ed86490cb8221c874d432461d77702437f63e5 (patch)
tree7fc3a99c9c71136846d98b5f1218f5ce84e1dda0 /PC
parent6ef726af3ec106013c7c4261ddb306854f2b1778 (diff)
downloadcpython-56ed86490cb8221c874d432461d77702437f63e5.zip
cpython-56ed86490cb8221c874d432461d77702437f63e5.tar.gz
cpython-56ed86490cb8221c874d432461d77702437f63e5.tar.bz2
bpo-9194: Fix the bounds checking in winreg.c's fixupMultiSZ() (GH-12687)
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 ae0c292..28b316a 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -521,7 +521,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++)
;
}
}