소스 검색

Change large math/big test literals to hex.

In September 2022, the Python team addressed a possible DoS issue converting big integers to and from base 10 strings: https://github.com/python/cpython/issues/95778

Converting to/from base 10 is a quadratic operation, so they limited it to 4300 digits: https://discuss.python.org/t/int-str-conversions-broken-in-latest-python-bugfix-releases/18889/83

Github CI still uses an old Python version which parsed our test suite just fine. This patch converts them to hex literals to ensure our test doesn't break when Github does update to a non-vulnerable Python version released after September 2022.
Jeroen van Rijn 2 년 전
부모
커밋
07cd6cd670
2개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      tests/core/.gitignore
  2. 0 0
      tests/core/math/big/test.py

+ 2 - 1
tests/core/.gitignore

@@ -1,2 +1,3 @@
 *.zip
-*.png
+*.png
+math_big_test_library.*

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 0 - 0
tests/core/math/big/test.py


이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.