Message 188477 - Python tracker
I didn't add the following optimization (proposed by Serhiy in his review) because I'm not convinced that it's faster, and it's unrelated to this issue:
if (width > (PY_SSIZE_T_MAX - 9) / 10
&& width > (PY_SSIZE_T_MAX - ((int)*f - '0')) / 10)
{ ... }
instead of
if (width > (PY_SSIZE_T_MAX - ((int)*f - '0')) / 10)
{ ... }