Skip to content

Commit

Permalink
Check the instrument list as well.
Browse files Browse the repository at this point in the history
  • Loading branch information
sinshu committed Jan 5, 2025
1 parent cdd77c7 commit 142059d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rustysynth/src/instrument_info.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ impl InstrumentInfo {
reader: &mut R,
size: usize,
) -> Result<Vec<InstrumentInfo>, SoundFontError> {
if size % 22 != 0 {
if size == 0 || size % 22 != 0 {
return Err(SoundFontError::InvalidInstrumentList);
}

Expand Down

0 comments on commit 142059d

Please sign in to comment.