]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
closes bpo-38124: Fix bounds check in PyState_AddModule. (GH-16007)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 12 Sep 2019 00:02:50 +0000 (17:02 -0700)
committerGitHub <noreply@github.com>
Thu, 12 Sep 2019 00:02:50 +0000 (17:02 -0700)
commit8892a1d685e4898b28961308b3c1447fe9ad3269
treefcb4788de1ca6525adfb0bfce2f9e03145ea8dd4
parentbf0c76cdf64625e88681f1c7fe9bdae64df07e3a
closes bpo-38124: Fix bounds check in PyState_AddModule. (GH-16007)

The >=, checking whether a module index was in already in the module-by-index list, needed to be strict.

Also, fold nested ifs into one and fix some bad spacing.
(cherry picked from commit 39de95b746c990e6a2fe9af5fad01747f58b2e5f)

Co-authored-by: Benjamin Peterson <benjamin@python.org>
Misc/NEWS.d/next/Core and Builtins/2019-09-12-00-14-01.bpo-38124.n6E0H7.rst [new file with mode: 0644]
Python/pystate.c