summaryrefslogtreecommitdiff
path: root/apps/talk.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/talk.c')
-rw-r--r--apps/talk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/talk.c b/apps/talk.c
index 73c26073b7..b2e25e1f8f 100644
--- a/apps/talk.c
+++ b/apps/talk.c
@@ -533,7 +533,7 @@ void talk_init(void)
533#endif /* CONFIG_CODEC == SWCODEC */ 533#endif /* CONFIG_CODEC == SWCODEC */
534 534
535 talk_initialized = true; 535 talk_initialized = true;
536 strncpy((char *) last_lang, (char *)global_settings.lang_file, 536 strlcpy((char *)last_lang, (char *)global_settings.lang_file,
537 MAX_FILENAME); 537 MAX_FILENAME);
538 538
539#if CONFIG_CODEC == SWCODEC 539#if CONFIG_CODEC == SWCODEC
@@ -755,7 +755,7 @@ static int talk_spell_basename(const char *path,
755 } 755 }
756 char buf[MAX_PATH]; 756 char buf[MAX_PATH];
757 /* Spell only the path component after the last slash */ 757 /* Spell only the path component after the last slash */
758 strncpy(buf, path, MAX_PATH); 758 strlcpy(buf, path, sizeof(buf));
759 if(strlen(buf) >1 && buf[strlen(buf)-1] == '/') 759 if(strlen(buf) >1 && buf[strlen(buf)-1] == '/')
760 /* strip trailing slash */ 760 /* strip trailing slash */
761 buf[strlen(buf)-1] = '\0'; 761 buf[strlen(buf)-1] = '\0';