summaryrefslogtreecommitdiff
path: root/firmware/common/dircache.c
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/common/dircache.c')
-rw-r--r--firmware/common/dircache.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/firmware/common/dircache.c b/firmware/common/dircache.c
index 1d6371a6b5..5902f8b3fd 100644
--- a/firmware/common/dircache.c
+++ b/firmware/common/dircache.c
@@ -1707,8 +1707,8 @@ static int sab_process_dir(struct dircache_entry *ce)
1707 /* save current paths size */ 1707 /* save current paths size */
1708 int pathpos = strlen(sab_path); 1708 int pathpos = strlen(sab_path);
1709 /* append entry */ 1709 /* append entry */
1710 strlcpy(&sab_path[pathpos], "/", sizeof(sab_path) - pathpos); 1710 strmemccpy(&sab_path[pathpos], "/", sizeof(sab_path) - pathpos);
1711 strlcpy(&sab_path[pathpos+1], entry->d_name, sizeof(sab_path) - pathpos - 1); 1711 strmemccpy(&sab_path[pathpos+1], entry->d_name, sizeof(sab_path) - pathpos - 1);
1712 1712
1713 int rc = sab_process_dir(ce->down); 1713 int rc = sab_process_dir(ce->down);
1714 /* restore path */ 1714 /* restore path */
@@ -1735,7 +1735,7 @@ static int sab_process_dir(struct dircache_entry *ce)
1735static int sab_process_volume(IF_MV(int volume,) struct dircache_entry *ce) 1735static int sab_process_volume(IF_MV(int volume,) struct dircache_entry *ce)
1736{ 1736{
1737 memset(ce, 0, sizeof(struct dircache_entry)); 1737 memset(ce, 0, sizeof(struct dircache_entry));
1738 strlcpy(sab_path, "/", sizeof sab_path); 1738 strmemccpy(sab_path, "/", sizeof sab_path);
1739 return sab_process_dir(ce); 1739 return sab_process_dir(ce);
1740} 1740}
1741 1741
@@ -1755,7 +1755,7 @@ int dircache_readdir_r(struct dircache_dirscan *dir, struct DIRENT *result)
1755 1755
1756 dir->scanidx = ce - dircache_root; 1756 dir->scanidx = ce - dircache_root;
1757 1757
1758 strlcpy(result->d_name, ce->d_name, sizeof (result->d_name)); 1758 strmemccpy(result->d_name, ce->d_name, sizeof (result->d_name));
1759 result->info = ce->dirinfo; 1759 result->info = ce->dirinfo;
1760 1760
1761 return 1; 1761 return 1;