stb_vorbis: Add missing cast to uint to avoid UB

Fixes issue #574.
This commit is contained in:
Fabian Giesen 2021-07-04 16:12:32 -07:00
parent e31da438e8
commit c817c9621e

View File

@ -4579,7 +4579,7 @@ static uint32 vorbis_find_page(stb_vorbis *f, uint32 *end, uint32 *last)
header[i] = get8(f);
if (f->eof) return 0;
if (header[4] != 0) goto invalid;
goal = header[22] + (header[23] << 8) + (header[24]<<16) + (header[25]<<24);
goal = header[22] + (header[23] << 8) + (header[24]<<16) + ((uint32)header[25]<<24);
for (i=22; i < 26; ++i)
header[i] = 0;
crc = 0;