From f4440456f7eaeabc8ac5ec4ccd17731cf5c27819 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 13 Dec 2012 21:28:54 +0000 Subject: [PATCH] actually we can just strdupa here instead SVN revision: 80899 --- src/bin/e_fm_op.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bin/e_fm_op.c b/src/bin/e_fm_op.c index ce6f0ebb6..49f95089f 100644 --- a/src/bin/e_fm_op.c +++ b/src/bin/e_fm_op.c @@ -1243,7 +1243,7 @@ _e_fm_op_copy_link(E_Fm_Op_Task *task) if (symlink(lnk_path, task->dst.name) == -1) { - char buf[PATH_MAX]; + char *buf; if (errno == EEXIST) { @@ -1254,14 +1254,14 @@ _e_fm_op_copy_link(E_Fm_Op_Task *task) } if (symlink(lnk_path, task->dst.name) == -1) { - strncpy(buf, lnk_path, sizeof(buf) - 1); + buf = strdupa(lnk_path); 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 { - strncpy(buf, lnk_path, sizeof(buf) - 1); + buf = strdupa(lnk_path); 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); }