grr meant strncpy!

SVN revision: 80898
This commit is contained in:
Mike Blumenkrantz 2012-12-13 21:25:29 +00:00
parent 4e35962cb1
commit 925645792e
1 changed files with 2 additions and 2 deletions

View File

@ -1254,14 +1254,14 @@ _e_fm_op_copy_link(E_Fm_Op_Task *task)
}
if (symlink(lnk_path, task->dst.name) == -1)
{
strncat(buf, lnk_path, sizeof(buf));
strncpy(buf, lnk_path, sizeof(buf) - 1);
free(lnk_path);
_E_FM_OP_ERROR_SEND_WORK(task, E_FM_OP_ERROR, "Cannot create link from '%s' to '%s': %s.", buf, task->dst.name);
}
}
else
{
strncat(buf, lnk_path, sizeof(buf));
strncpy(buf, lnk_path, sizeof(buf) - 1);
free(lnk_path);
_E_FM_OP_ERROR_SEND_WORK(task, E_FM_OP_ERROR, "Cannot create link from '%s' to '%s': %s.", buf, task->dst.name);
}