[vlc-devel] [PATCH] flac: frame_size shouldn't exceed input buffer size
Tristan Matthews
le.businessman at gmail.com
Fri Dec 6 06:34:26 CET 2013
Fixes #9966
---
modules/packetizer/flac.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/modules/packetizer/flac.c b/modules/packetizer/flac.c
index 2f16717..39174ef 100644
--- a/modules/packetizer/flac.c
+++ b/modules/packetizer/flac.c
@@ -571,6 +571,8 @@ static block_t *Packetize(decoder_t *p_dec, block_t **pp_block)
p_sys->i_state = STATE_NEXT_SYNC;
p_sys->i_frame_size = p_sys->b_stream_info && p_sys->stream_info.min_framesize > 0 ?
p_sys->stream_info.min_framesize : 1;
+ p_sys->i_frame_size = __MIN( p_sys->i_frame_size,
+ in->i_buffer );
/* Calculate the initial CRC for the minimal frame size,
* We'll update it as we look for the next start code. */
--
1.8.1.2
More information about the vlc-devel
mailing list