break;
case 'f':
- strncpy (fn, folder->ff->name, sizeof (fn) - 1);
+ m_strcpy(fn, sizeof(fn), folder->ff->name);
snprintf (tmp, sizeof (tmp), "%%%ss", fmt);
snprintf (dest, destlen, tmp, fn);
break;
for (i = m_strlen(f) - 1; i > 0 && f[i] != '/'; i--);
if (i > 0) {
if (f[0] == '/') {
- if (i > sizeof (LastDir) - 1)
- i = sizeof (LastDir) - 1;
- strncpy (LastDir, f, i);
- LastDir[i] = 0;
+ i = MIN(sizeof(LastDir) - 1, i);
+ m_strcpy(LastDir, sizeof(LastDir), f);
}
else {
getcwd (LastDir, sizeof (LastDir));