Perl is one of the things I never quite had the justification to get into. Unfortunately, I've got a very specific (looks like a bug to me) bit of Perl code, and I need to define it's operation provably.
This code is written and in production already, I wish to have it removed.
I believe it's impossible to successfully match, but it's one of those things that a guess on the subject (especially mine) is not good enough. It is guarding a code block {}
which, unfortunately has multiple conditions, so can be entered regardless of the state of this expression, but there is a security issue if this does happen (a bug in itself if the state is undefined IMHO, yet w/o a proof the impact/severity is lower (read never going to get fixed)).
Is it possible to /abcd^$/i
to ever, match successfully? Including null byte insertion's or any possible byte/binary data? I'd even go with some insane environmental attack (e.g. consuming all of the memory on the host within 1 byte, causing the Perl expression evaluator to fail an unchecked 2 byte allocation in the run-time). Kudos for creativity.