diff options
Diffstat (limited to 'apps/recorder/pcm_record.c')
-rw-r--r-- | apps/recorder/pcm_record.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/apps/recorder/pcm_record.c b/apps/recorder/pcm_record.c index 8657aee1ba..d1dc03113d 100644 --- a/apps/recorder/pcm_record.c +++ b/apps/recorder/pcm_record.c | |||
@@ -529,7 +529,7 @@ static bool pcmrec_fnq_is_full(void) | |||
529 | /* queue another filename - will overwrite oldest one if full */ | 529 | /* queue another filename - will overwrite oldest one if full */ |
530 | static bool pcmrec_fnq_add_filename(const char *filename) | 530 | static bool pcmrec_fnq_add_filename(const char *filename) |
531 | { | 531 | { |
532 | strncpy(fn_queue + fnq_wr_pos, filename, MAX_PATH); | 532 | strlcpy(fn_queue + fnq_wr_pos, filename, MAX_PATH); |
533 | fnq_wr_pos = FNQ_NEXT(fnq_wr_pos); | 533 | fnq_wr_pos = FNQ_NEXT(fnq_wr_pos); |
534 | 534 | ||
535 | if (fnq_rd_pos != fnq_wr_pos) | 535 | if (fnq_rd_pos != fnq_wr_pos) |
@@ -550,7 +550,7 @@ static bool pcmrec_fnq_replace_tail(const char *filename) | |||
550 | 550 | ||
551 | pos = FNQ_PREV(fnq_wr_pos); | 551 | pos = FNQ_PREV(fnq_wr_pos); |
552 | 552 | ||
553 | strncpy(fn_queue + pos, filename, MAX_PATH); | 553 | strlcpy(fn_queue + pos, filename, MAX_PATH); |
554 | 554 | ||
555 | return true; | 555 | return true; |
556 | } /* pcmrec_fnq_replace_tail */ | 556 | } /* pcmrec_fnq_replace_tail */ |
@@ -562,7 +562,7 @@ static bool pcmrec_fnq_get_filename(char *filename) | |||
562 | return false; | 562 | return false; |
563 | 563 | ||
564 | if (filename) | 564 | if (filename) |
565 | strncpy(filename, fn_queue + fnq_rd_pos, MAX_PATH); | 565 | strlcpy(filename, fn_queue + fnq_rd_pos, MAX_PATH); |
566 | 566 | ||
567 | fnq_rd_pos = FNQ_NEXT(fnq_rd_pos); | 567 | fnq_rd_pos = FNQ_NEXT(fnq_rd_pos); |
568 | return true; | 568 | return true; |
@@ -976,7 +976,7 @@ static void pcmrec_new_stream(const char *filename, /* next file name */ | |||
976 | bool did_flush = false; /* did a flush occurr? */ | 976 | bool did_flush = false; /* did a flush occurr? */ |
977 | 977 | ||
978 | if (filename) | 978 | if (filename) |
979 | strncpy(path, filename, MAX_PATH); | 979 | strlcpy(path, filename, MAX_PATH); |
980 | queue_reply(&pcmrec_queue, 0); /* We have all we need */ | 980 | queue_reply(&pcmrec_queue, 0); /* We have all we need */ |
981 | 981 | ||
982 | data.pre_chunk = NULL; | 982 | data.pre_chunk = NULL; |