cdrom: fix drive model string corruption

This commit is contained in:
Brad Parker 2019-07-08 15:52:57 -04:00
parent 15d97dbaf3
commit cd98fa2745
2 changed files with 3 additions and 3 deletions

View File

@ -1254,7 +1254,7 @@ struct string_list* cdrom_get_available_drives(void)
if (strstr(dir_list->elems[i].data, "/dev/sg")) if (strstr(dir_list->elems[i].data, "/dev/sg"))
{ {
char drive_model[32] = {0}; char drive_model[32] = {0};
char drive_string[32] = {0}; char drive_string[33] = {0};
union string_list_elem_attr attr = {0}; union string_list_elem_attr attr = {0};
int dev_index = 0; int dev_index = 0;
RFILE *file = filestream_open(dir_list->elems[i].data, RETRO_VFS_FILE_ACCESS_READ, 0); RFILE *file = filestream_open(dir_list->elems[i].data, RETRO_VFS_FILE_ACCESS_READ, 0);
@ -1309,7 +1309,7 @@ struct string_list* cdrom_get_available_drives(void)
else else
{ {
char drive_model[32] = {0}; char drive_model[32] = {0};
char drive_string[64] = {0}; char drive_string[33] = {0};
union string_list_elem_attr attr = {0}; union string_list_elem_attr attr = {0};
RFILE *file = filestream_open(cdrom_path, RETRO_VFS_FILE_ACCESS_READ, 0); RFILE *file = filestream_open(cdrom_path, RETRO_VFS_FILE_ACCESS_READ, 0);
const libretro_vfs_implementation_file *stream; const libretro_vfs_implementation_file *stream;

View File

@ -4906,7 +4906,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
for (i = 0; list && i < list->size; i++) for (i = 0; list && i < list->size; i++)
{ {
char drive_string[32] = {0}; char drive_string[256] = {0};
char drive[2] = {0}; char drive[2] = {0};
size_t pos = 0; size_t pos = 0;