[Python-checkins] bpo-9194: Fix the bounds checking in winreg.c's fixupMultiSZ() (GH-12687) (GH-12910)
Ned Deily
webhook-mailer at python.org
Thu May 2 12:00:39 EDT 2019
https://github.com/python/cpython/commit/dadc34784444950c389c120fb16f44e5a29cc43f
commit: dadc34784444950c389c120fb16f44e5a29cc43f
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: Ned Deily <nad at python.org>
date: 2019-05-02T12:00:33-04:00
summary:
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 at gmail.com>
files:
M PC/winreg.c
diff --git a/PC/winreg.c b/PC/winreg.c
index 3fde04d746b5..5739cf43335a 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++)
;
}
}
More information about the Python-checkins
mailing list