This issue is still present in SWIG 4.3.0. It appears that the problem is caused by a SWIG wrapper that tests the string length using INT_MAX rather than SIZE_MAX. See the bug report that describes the issue and proposed solution.
Regards - Marie