bpo-9194: Fix the bounds checking in winreg.c's fixupMultiSZ() (GH-12687)
![](https://secure.gravatar.com/avatar/cc7737cd64a84f1b5c61a160798e97ee.jpg?s=120&d=mm&r=g)
https://github.com/python/cpython/commit/7038deed09784a03e2a7bad500f0054d298... commit: 7038deed09784a03e2a7bad500f0054d29876ae7 branch: 3.7 author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> committer: GitHub <noreply@github.com> date: 2019-04-22T10:20:33-07:00 summary: 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> files: M PC/winreg.c diff --git a/PC/winreg.c b/PC/winreg.c index e3801b257b07..96dd4ef059be 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++) ; } }
participants (1)
-
Miss Islington (bot)