/* This is where the debugger's %{"::_<$filename"} hash is created */
tmpbuf[0] = '_';
tmpbuf[1] = '<';
- strcpy(tmpbuf + 2, name);
+ memcpy(tmpbuf + 2, name, tmplen - 1);
gv = *(GV**)hv_fetch(PL_defstash, tmpbuf, tmplen, TRUE);
if (!isGV(gv)) {
gv_init(gv, PL_defstash, tmpbuf, tmplen, FALSE);
char *newaddr;
const STRLEN pvlen = strlen(pv)+1;
New(902,newaddr,pvlen,char);
- return strcpy(newaddr,pv);
+ return memcpy(newaddr,pv,pvlen);
}
}
Perl_savesharedpv(pTHX_ const char *pv)
{
register char *newaddr;
+ STRLEN pvlen;
if (!pv)
return Nullch;
- newaddr = (char*)PerlMemShared_malloc(strlen(pv)+1);
+ pvlen = strlen(pv)+1;
+ newaddr = (char*)PerlMemShared_malloc(pvlen);
if (!newaddr) {
PerlLIO_write(PerlIO_fileno(Perl_error_log),
PL_no_mem, strlen(PL_no_mem));
my_exit(1);
}
- return strcpy(newaddr,pv);
+ return memcpy(newaddr,pv,pvlen);
}
/*
len = strlen(scriptname);
if (len+MAX_EXT_LEN+1 >= sizeof(tmpbuf))
break;
+ /* FIXME? Convert to memcpy */
cur = strcpy(tmpbuf, scriptname);
}
} while (extidx >= 0 && ext[extidx] /* try an extension? */
tmpbuf[len++] = ':';
#else
if (len
-#if defined(atarist) || defined(__MINT__) || defined(DOSISH)
+# if defined(atarist) || defined(__MINT__) || defined(DOSISH)
&& tmpbuf[len - 1] != '/'
&& tmpbuf[len - 1] != '\\'
-#endif
+# endif
)
tmpbuf[len++] = '/';
if (len == 2 && tmpbuf[0] == '.')
seen_dot = 1;
#endif
+ /* FIXME? Convert to memcpy by storing previous strlen(scriptname)
+ */
(void)strcpy(tmpbuf + len, scriptname);
#endif /* !VMS */