diff options
author | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-03-17 14:54:36 +0300 |
---|---|---|
committer | Hendrik Leppkes <h.leppkes@gmail.com> | 2016-03-17 14:54:36 +0300 |
commit | f1c76bda7d33170c7809e6f451373b94933b3d22 (patch) | |
tree | a57446aeff97aadba0f3ada7c391d72d4e77fdf7 /decoder | |
parent | 2f112a2698d70d522839f8a188403144bb70ce9f (diff) |
Stop reading before the end of the buffer to avoid overreads
Diffstat (limited to 'decoder')
-rw-r--r-- | decoder/LAVAudio/LAVAudio.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/decoder/LAVAudio/LAVAudio.cpp b/decoder/LAVAudio/LAVAudio.cpp index b37a849b..b1486a74 100644 --- a/decoder/LAVAudio/LAVAudio.cpp +++ b/decoder/LAVAudio/LAVAudio.cpp @@ -1738,7 +1738,7 @@ HRESULT CLAVAudio::ResyncMPEGAudio() uint8_t *buf = m_buff.Ptr(); int size = m_buff.GetCount(); - for (int i = 0; i < size; i++) + for (int i = 0; i < (size - 3); i++) { uint32_t header, header2; int frame_size = check_mpegaudio_header(buf + i, &header); |