This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Add memCHRs() macro and use it
authorKarl Williamson <khw@cpan.org>
Sat, 7 Dec 2019 20:47:05 +0000 (13:47 -0700)
committerKarl Williamson <khw@cpan.org>
Wed, 18 Dec 2019 16:33:09 +0000 (09:33 -0700)
commit4aada8b9eda25f3f024283c0c27c1424b5ba40ff
tree2c0ded2d593e998be054336ebf9648e4e18877fb
parentfcafb10c71dbfc03eacb02eeb0c567facc269a72
Add memCHRs() macro and use it

This replaces strchr("list", c) calls throughout the core.  They don't
work properly when 'c' is a NUL, returning the position of the
terminating NUL in "list" instead of failure.  This could lead to
segfaults or even security issues.
23 files changed:
amigaos4/amigaio.c
doio.c
ext/B/B.pm
ext/B/B.xs
ext/VMS-Stdio/Stdio.pm
ext/VMS-Stdio/Stdio.xs
handy.h
numeric.c
op.c
os2/dl_os2.c
os2/os2.c
perl.c
pod/perlhacktips.pod
pp_hot.c
pp_pack.c
regcomp.c
sv.c
t/porting/known_pod_issues.dat
taint.c
toke.c
util.c
util.h
vms/vms.c