summaryrefslogtreecommitdiffstats
path: root/apps/gui/folder_select.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/gui/folder_select.c')
-rw-r--r--apps/gui/folder_select.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/gui/folder_select.c b/apps/gui/folder_select.c
index cef95e179e..a76d77562b 100644
--- a/apps/gui/folder_select.c
+++ b/apps/gui/folder_select.c
@@ -185,7 +185,7 @@ static struct folder* load_folder(struct folder* parent, char *folder)
if (len >= sizeof(fullpath))
goto fail;
}
- strlcpy(&fullpath[len], folder, sizeof(fullpath) - len);
+ strmemccpy(&fullpath[len], folder, sizeof(fullpath) - len);
logf("load_folder: [%s]", fullpath);
dir = opendir(fullpath);
@@ -208,7 +208,7 @@ static struct folder* load_folder(struct folder* parent, char *folder)
if ((dn[0] == '.') && (dn[1] == '\0' || (dn[1] == '.' && dn[2] == '\0')))
continue;
/* copy entry name to end of buffer, save pointer */
- int len = strlen((char *)entry->d_name);
+ len = strlen((char *)entry->d_name);
char *name = folder_alloc_from_end(len+1); /*for NULL*/
if (name == NULL)
{
@@ -518,7 +518,7 @@ static int select_paths(struct folder* root, const char* filenames)
lastfnp = fnp;
if (len <= 0 || len + 1 >= buflen)
continue;
- strlcpy(buf, sstr, len + 1);
+ strmemccpy(buf, sstr, len + 1);
struct child *item = find_from_filename(buf, root);
if (item)
item->state = SELECTED;
@@ -563,7 +563,7 @@ static void save_folders_r(struct folder *root, char* dst, size_t maxlen, size_t
int dlen = strlen(dst);
if (dlen + len >= maxlen)
continue;
- strlcpy(&dst[dlen], buffer_front, maxlen - dlen);
+ strmemccpy(&dst[dlen], buffer_front, maxlen - dlen);
}
else
{