Browse Source

packetizer: flac: avoid integer overflow

Fixes #29010
Fixes https://issues.oss-fuzz.com/issues/42503720

found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/vlc
pull/177/head
Tristan Matthews 1 year ago
committed by Jean-Baptiste Kempf
parent
commit
d0100b92ac
  1. 4
      modules/packetizer/flac.h

4
modules/packetizer/flac.h

@ -245,6 +245,10 @@ static inline int FLAC_ParseSyncInfo(const uint8_t *p_buf, unsigned i_buf,
if (i_fsnumber == UINT64_MAX)
return 0;
/* Invalid Sample/Frame number */
if (stream_info->total_samples != 0 && i_fsnumber > stream_info->total_samples)
return 0;
i_header += i_read;
/* Read blocksize */

Loading…
Cancel
Save