diff options
Diffstat (limited to 'apps/bookmark.c')
-rw-r--r-- | apps/bookmark.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/apps/bookmark.c b/apps/bookmark.c index 39a9aa07d2..363660306c 100644 --- a/apps/bookmark.c +++ b/apps/bookmark.c | |||
@@ -96,7 +96,10 @@ static bool parse_bookmark(const char *bookmark, | |||
96 | bool *shuffle, | 96 | bool *shuffle, |
97 | char* file_name); | 97 | char* file_name); |
98 | static int buffer_bookmarks(struct bookmark_list* bookmarks, int first_line); | 98 | static int buffer_bookmarks(struct bookmark_list* bookmarks, int first_line); |
99 | static char* get_bookmark_info(int list_index, void* data, char *buffer); | 99 | static char* get_bookmark_info(int list_index, |
100 | void* data, | ||
101 | char *buffer, | ||
102 | size_t buffer_len); | ||
100 | static char* select_bookmark(const char* bookmark_file_name, bool show_dont_resume); | 103 | static char* select_bookmark(const char* bookmark_file_name, bool show_dont_resume); |
101 | static bool system_check(void); | 104 | static bool system_check(void); |
102 | static bool write_bookmark(bool create_bookmark_file); | 105 | static bool write_bookmark(bool create_bookmark_file); |
@@ -523,7 +526,10 @@ static int buffer_bookmarks(struct bookmark_list* bookmarks, int first_line) | |||
523 | return bookmarks->start + bookmarks->count; | 526 | return bookmarks->start + bookmarks->count; |
524 | } | 527 | } |
525 | 528 | ||
526 | static char* get_bookmark_info(int list_index, void* data, char *buffer) | 529 | static char* get_bookmark_info(int list_index, |
530 | void* data, | ||
531 | char *buffer, | ||
532 | size_t buffer_len) | ||
527 | { | 533 | { |
528 | struct bookmark_list* bookmarks = (struct bookmark_list*) data; | 534 | struct bookmark_list* bookmarks = (struct bookmark_list*) data; |
529 | int index = list_index / 2; | 535 | int index = list_index / 2; |
@@ -625,7 +631,7 @@ static char* get_bookmark_info(int list_index, void* data, char *buffer) | |||
625 | } | 631 | } |
626 | 632 | ||
627 | strrsplt(global_filename, '.'); | 633 | strrsplt(global_filename, '.'); |
628 | snprintf(buffer, MAX_PATH, format, name, global_filename); | 634 | snprintf(buffer, buffer_len, format, name, global_filename); |
629 | return buffer; | 635 | return buffer; |
630 | } | 636 | } |
631 | else | 637 | else |
@@ -633,7 +639,7 @@ static char* get_bookmark_info(int list_index, void* data, char *buffer) | |||
633 | char time_buf[32]; | 639 | char time_buf[32]; |
634 | 640 | ||
635 | format_time(time_buf, sizeof(time_buf), resume_time); | 641 | format_time(time_buf, sizeof(time_buf), resume_time); |
636 | snprintf(buffer, MAX_PATH, "%s, %d%s", time_buf, resume_index + 1, | 642 | snprintf(buffer, buffer_len, "%s, %d%s", time_buf, resume_index + 1, |
637 | shuffle ? (char*) str(LANG_BOOKMARK_SHUFFLE) : ""); | 643 | shuffle ? (char*) str(LANG_BOOKMARK_SHUFFLE) : ""); |
638 | return buffer; | 644 | return buffer; |
639 | } | 645 | } |