mirror of
https://github.com/vgmstream/vgmstream.git
synced 2024-11-29 00:34:33 +01:00
Fix potential bugs
This commit is contained in:
parent
af70e95877
commit
d4ba9d9d57
@ -125,7 +125,7 @@ static size_t eaac_io_size(STREAMFILE *streamfile, eaac_io_data* data) {
|
||||
return data->total_size;
|
||||
|
||||
physical_offset = data->start_offset;
|
||||
max_physical_offset = get_streamfile_size(streamfile) - data->start_offset;
|
||||
max_physical_offset = get_streamfile_size(streamfile);
|
||||
|
||||
/* get size of the underlying, non-blocked data */
|
||||
while (physical_offset < max_physical_offset) {
|
||||
@ -174,6 +174,11 @@ static size_t eaac_io_size(STREAMFILE *streamfile, eaac_io_data* data) {
|
||||
break; /* stop on last block */
|
||||
}
|
||||
|
||||
if (total_size > get_streamfile_size(streamfile)) {
|
||||
VGM_LOG("EA SCHL: wrong streamfile total_size\n");
|
||||
total_size = 0;
|
||||
}
|
||||
|
||||
data->total_size = total_size;
|
||||
return data->total_size;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user