mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-27 03:50:29 +00:00
src/wav.c: Fix infinite loop in exif parser
Integer overflow found my American Fuzzy Lop.
This commit is contained in:
parent
1b93de430a
commit
fdd6b8c194
@ -2000,7 +2000,7 @@ exif_subchunk_parse (SF_PRIVATE *psf, uint32_t length)
|
||||
case olym_MARKER :
|
||||
bytesread += psf_binheader_readf (psf, "4", &dword) ;
|
||||
psf_log_printf (psf, "%M : %u\n", marker, dword) ;
|
||||
if (bytesread + dword > length)
|
||||
if (dword > length || bytesread + dword > length)
|
||||
break ;
|
||||
dword += (dword & 1) ;
|
||||
bytesread += psf_binheader_readf (psf, "j", dword) ;
|
||||
|
Loading…
Reference in New Issue
Block a user