Backport proposed fix for CVE-2025-13836.

Source: Fedora 42: mingw-python3 Important DoS Excessive Buffering CVE-2025-13836