summaryrefslogtreecommitdiff
path: root/apps/shortcuts.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/shortcuts.c')
-rw-r--r--apps/shortcuts.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/shortcuts.c b/apps/shortcuts.c
index 1253e77a65..752ca977e6 100644
--- a/apps/shortcuts.c
+++ b/apps/shortcuts.c
@@ -284,7 +284,7 @@ void shortcuts_add(enum shortcut_type type, const char* value)
284 if (type == SHORTCUT_SETTING) 284 if (type == SHORTCUT_SETTING)
285 sc->u.setting = (void*)value; 285 sc->u.setting = (void*)value;
286 else 286 else
287 strlcpy(sc->u.path, value, MAX_PATH); 287 strmemccpy(sc->u.path, value, MAX_PATH);
288 288
289 if (first_idx_to_writeback < 0) 289 if (first_idx_to_writeback < 0)
290 first_idx_to_writeback = shortcut_count - 1; 290 first_idx_to_writeback = shortcut_count - 1;
@@ -325,7 +325,7 @@ static int readline_cb(int n, char *buf, void *parameters)
325 } 325 }
326 else if (nm_op == 1) /*name*/ 326 else if (nm_op == 1) /*name*/
327 { 327 {
328 strlcpy(sc->name, value, MAX_SHORTCUT_NAME); 328 strmemccpy(sc->name, value, MAX_SHORTCUT_NAME);
329 } 329 }
330 else if (nm_op == 2) /*data*/ 330 else if (nm_op == 2) /*data*/
331 { 331 {
@@ -339,7 +339,7 @@ static int readline_cb(int n, char *buf, void *parameters)
339 case SHORTCUT_FILE: 339 case SHORTCUT_FILE:
340 case SHORTCUT_DEBUGITEM: 340 case SHORTCUT_DEBUGITEM:
341 case SHORTCUT_PLAYLISTMENU: 341 case SHORTCUT_PLAYLISTMENU:
342 strlcpy(sc->u.path, value, MAX_PATH); 342 strmemccpy(sc->u.path, value, MAX_PATH);
343 break; 343 break;
344 case SHORTCUT_SETTING: 344 case SHORTCUT_SETTING:
345 sc->u.setting = find_setting_by_cfgname(value, NULL); 345 sc->u.setting = find_setting_by_cfgname(value, NULL);
@@ -374,7 +374,7 @@ static int readline_cb(int n, char *buf, void *parameters)
374 } 374 }
375 else if (nm_op == 4) /*talkclip*/ 375 else if (nm_op == 4) /*talkclip*/
376 { 376 {
377 strlcpy(sc->talk_clip, value, MAX_PATH); 377 strmemccpy(sc->talk_clip, value, MAX_PATH);
378 } 378 }
379 } 379 }
380 return 0; 380 return 0;
@@ -534,7 +534,7 @@ static int shortcut_menu_speak_item(int selected_item, void * data)
534 if (*filename != '\0') 534 if (*filename != '\0')
535 { 535 {
536 int dirlen = (filename - sc->u.path); 536 int dirlen = (filename - sc->u.path);
537 strlcpy(path, sc->u.path, dirlen + 1); 537 strmemccpy(path, sc->u.path, dirlen + 1);
538 dir = opendir(path); 538 dir = opendir(path);
539 if (dir) 539 if (dir)
540 { 540 {