mirror of
https://github.com/vgmstream/vgmstream.git
synced 2025-01-17 23:36:41 +01:00
Crash fix for random files passing into this function and attempting to allocate negative channel count arrays
This commit is contained in:
parent
1ad884287b
commit
64be1ead91
@ -2379,7 +2379,7 @@ VGMSTREAM * init_vgmstream_dsp_dspw(STREAMFILE *streamFile) {
|
||||
VARDECL(struct dsp_header, ch_header);
|
||||
VARDECL(off_t, channel_start);
|
||||
|
||||
channel_count = read_8bit(0x1B, streamFile);
|
||||
channel_count = (unsigned char)read_8bit(0x1B, streamFile);
|
||||
|
||||
ALLOC(ch_header, channel_count, struct dsp_header);
|
||||
ALLOC(channel_start, channel_count, off_t);
|
||||
|
Loading…
x
Reference in New Issue
Block a user