summaryrefslogtreecommitdiffstats
path: root/src/askloc.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-11-03 15:24:33 +0100
committerChristophe Grenier <grenier@cgsecurity.org>2013-11-03 15:24:33 +0100
commit191a261516d0f55336f37ced9fa3695d66d225d9 (patch)
tree1c74a906a1da183586adba291a2dd56cb9f3f16c /src/askloc.c
parent2fd70a3b9ed309f1cf3f57d10faebf29bb451037 (diff)
fix minor code defects
Diffstat (limited to 'src/askloc.c')
-rw-r--r--src/askloc.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/askloc.c b/src/askloc.c
index 49e30fe..3dc41fd 100644
--- a/src/askloc.c
+++ b/src/askloc.c
@@ -169,7 +169,10 @@ char *ask_location(const char*msg, const char *src_dir, const char *dst_org)
WINDOW *window=newwin(LINES, COLS, 0, 0); /* full screen */
aff_copy_short(window);
if(dst_org != NULL)
+ {
strncpy(dst_directory, dst_org, sizeof(dst_directory));
+ dst_directory[sizeof(dst_directory)-1]='\0';
+ }
else
td_getcwd(dst_directory, sizeof(dst_directory));
do