This allows things to work properly in the face of embedded NULs.
See the branch merge message for more information.
STRLEN nlen = 0;
/* New style explicit name, type is just mode and layer info */
#ifdef USE_STDIO
- if (SvROK(*svp) && !strchr(oname,'&')) {
+ if (SvROK(*svp) && !memchr(oname, '&', len)) {
if (ckWARN(WARN_IO))
Perl_warner(aTHX_ packWARN(WARN_IO),
"Can't open a reference");
else {
const char *end;
fail_discipline:
- end = strchr(s+1, ':');
+ end = (char *) memchr(s+1, ':', len);
if (!end)
end = s+len;
#ifndef PERLIO_LAYERS