Issue #29145: Fix overflow checks in str.replace() and str.join().

Based on patch by Martin Panter.
1 file changed