https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111615
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I don't think this is a bug. memmem is defined such that a null pointer argument is undefined even if the len is 0.
pinskia at gcc dot gnu.org via Gcc-bugs Wed, 27 Sep 2023 08:05:16 -0700
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111615
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> --- I don't think this is a bug. memmem is defined such that a null pointer argument is undefined even if the len is 0.