diff options
-rw-r--r-- | apps/playlist_catalog.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/playlist_catalog.c b/apps/playlist_catalog.c index 5741d11258..3d524998b2 100644 --- a/apps/playlist_catalog.c +++ b/apps/playlist_catalog.c | |||
@@ -322,7 +322,7 @@ bool catalog_add_to_a_playlist(const char* sel, int sel_attr, | |||
322 | bool new_playlist, char *m3u8name) | 322 | bool new_playlist, char *m3u8name) |
323 | { | 323 | { |
324 | int result; | 324 | int result; |
325 | char playlist[MAX_PATH]; | 325 | char playlist[MAX_PATH + 6]; |
326 | if (in_add_to_playlist) | 326 | if (in_add_to_playlist) |
327 | return false; | 327 | return false; |
328 | 328 | ||
@@ -336,7 +336,7 @@ bool catalog_add_to_a_playlist(const char* sel, int sel_attr, | |||
336 | { | 336 | { |
337 | /*If sel is a folder, we prefill the text field with its name*/ | 337 | /*If sel is a folder, we prefill the text field with its name*/ |
338 | const char *name = strrchr(sel, '/'); | 338 | const char *name = strrchr(sel, '/'); |
339 | snprintf(playlist, MAX_PATH, "%s/%s.m3u8", | 339 | snprintf(playlist, sizeof(playlist), "%s/%s.m3u8", |
340 | playlist_dir, | 340 | playlist_dir, |
341 | (name!=NULL && (sel_attr & ATTR_DIRECTORY))?name+1:""); | 341 | (name!=NULL && (sel_attr & ATTR_DIRECTORY))?name+1:""); |
342 | } | 342 | } |
@@ -350,7 +350,7 @@ bool catalog_add_to_a_playlist(const char* sel, int sel_attr, | |||
350 | else if(len <= 5 || strcasecmp(&playlist[len-5], ".m3u8")) | 350 | else if(len <= 5 || strcasecmp(&playlist[len-5], ".m3u8")) |
351 | strcat(playlist, ".m3u8"); | 351 | strcat(playlist, ".m3u8"); |
352 | 352 | ||
353 | if (kbd_input(playlist, MAX_PATH)) | 353 | if (kbd_input(playlist, sizeof(playlist))) |
354 | return false; | 354 | return false; |
355 | } | 355 | } |
356 | else | 356 | else |