Branch: refs/heads/blead
Home: https://github.com/Perl/perl5
Commit: 92ef216deffb274d2e40a3516632fb089187b008
https://github.com/Perl/perl5/commit/92ef216deffb274d2e40a3516632fb089187b008
Author: Tony Cook <[email protected]>
Date: 2023-01-17 (Tue, 17 Jan 2023)
Changed paths:
M pp_hot.c
Log Message:
-----------
pp_multiconcat: don't set svpv_p to an invalid pointer
When svpv_base == svpv_buf, svpv_p would be set to point before the
buffer, which is undefined.
This appears to be what gcc 13 is complaining about in #20678,
despite that report including what appears to be a completely valid
address, on a line where the value of svpv_p is now within the range
of svpv_buf.
An intermediate approach to this used:
temp = svpv_p;
if (svpv_p++ == svpv_end)
break
but this is also incorrect, since svpv_p would end up as an invalid
pointer, though gcc UBSAN didn't pick that up.
Fixes #20678.