summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apps/tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/tree.c b/apps/tree.c
index 88ccff5e37..1f7102dbb9 100644
--- a/apps/tree.c
+++ b/apps/tree.c
@@ -372,7 +372,7 @@ static int update_dir(void)
372 { 372 {
373 if (ft_load(&tc, NULL) < 0) 373 if (ft_load(&tc, NULL) < 0)
374 return -1; 374 return -1;
375 strcpy(lastdir, tc.currdir); 375 strlcpy(lastdir, tc.currdir, MAX_PATH);
376 changed = true; 376 changed = true;
377 } 377 }
378 } 378 }
@@ -568,7 +568,7 @@ void set_current_file(const char *path)
568 name = path+1; 568 name = path+1;
569 } 569 }
570 570
571 strcpy(lastfile, name); 571 strlcpy(lastfile, name, MAX_PATH);
572 572
573 573
574 /* If we changed dir we must recalculate the dirlevel 574 /* If we changed dir we must recalculate the dirlevel
@@ -987,7 +987,7 @@ int rockbox_browse(struct browse_context *browse)
987 if (dirfilter != SHOW_ID3DB) 987 if (dirfilter != SHOW_ID3DB)
988 tc.dirfilter = &global_settings.dirfilter; 988 tc.dirfilter = &global_settings.dirfilter;
989 tc.browse = browse; 989 tc.browse = browse;
990 strcpy(current, browse->root); 990 strlcpy(current, browse->root, MAX_PATH);
991 set_current_file(current); 991 set_current_file(current);
992 if (browse->flags&BROWSE_RUNFILE) 992 if (browse->flags&BROWSE_RUNFILE)
993 ret_val = ft_enter(&tc); 993 ret_val = ft_enter(&tc);