This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients Niclas Larsson, eric.smith, larry, python-dev, vstinner
Date 2020-09-28.22:08:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
"Use strnlen instead of strlen when the size i known" rationale was "This PR changes strlen to strnlen so no buffer overruns are made when there's no null terminator", but strlen() was not called whne the string was not null terminated.

Serhiy wrote that strnlen() can be faster and that can be slower... If the goal is an optimization, a benchmark should prove it (on at least one platform).
Date User Action Args
2020-09-28 22:08:46vstinnersetrecipients: + vstinner, larry, eric.smith, python-dev, Niclas Larsson
2020-09-28 22:08:46vstinnersetmessageid: <>
2020-09-28 22:08:46vstinnerlinkissue41170 messages
2020-09-28 22:08:46vstinnercreate