mirror of
https://github.com/Perl/perl5.git
synced 2026-01-26 08:38:23 +00:00
POSIX::strftime() can call sv_strftime_common() with arbitrary SVs. SvCUR() assumes it is being called on an actual string. With other SV types it can return garbage or just crash. Make sure SvPV() is called first to stringify the format, before SvUTF8() and SvCUR() inspect the SV. Fixes #22498.