diff options
Diffstat (limited to 'apps/mpeg.c')
-rw-r--r-- | apps/mpeg.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/apps/mpeg.c b/apps/mpeg.c index 8518ab68e6..0e1217b5c8 100644 --- a/apps/mpeg.c +++ b/apps/mpeg.c | |||
@@ -2203,8 +2203,7 @@ void audio_record(const char *filename) | |||
2203 | { | 2203 | { |
2204 | mpeg_errno = 0; | 2204 | mpeg_errno = 0; |
2205 | 2205 | ||
2206 | strncpy(recording_filename, filename, MAX_PATH - 1); | 2206 | strlcpy(recording_filename, filename, MAX_PATH); |
2207 | recording_filename[MAX_PATH - 1] = 0; | ||
2208 | 2207 | ||
2209 | queue_post(&mpeg_queue, MPEG_RECORD, 0); | 2208 | queue_post(&mpeg_queue, MPEG_RECORD, 0); |
2210 | } | 2209 | } |
@@ -2509,8 +2508,7 @@ void audio_new_file(const char *filename) | |||
2509 | { | 2508 | { |
2510 | mpeg_errno = 0; | 2509 | mpeg_errno = 0; |
2511 | 2510 | ||
2512 | strncpy(recording_filename, filename, MAX_PATH - 1); | 2511 | strlcpy(recording_filename, filename, MAX_PATH); |
2513 | recording_filename[MAX_PATH - 1] = 0; | ||
2514 | 2512 | ||
2515 | queue_post(&mpeg_queue, MPEG_NEW_FILE, 0); | 2513 | queue_post(&mpeg_queue, MPEG_NEW_FILE, 0); |
2516 | } | 2514 | } |