diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-09-08 11:46:18 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-09-08 11:51:36 +0200 |
commit | 13e35a25f6703a68cfede58e5e6ae455caaee8c3 (patch) | |
tree | e260e8d8c74a8624b40092297e2017495d9ba100 | |
parent | 58e5f6a4332077eb7e1cfd8a6a3d0bc59759386d (diff) | |
parent | 7ee191cab0dc44700f26c5784e2adeb6a779651b (diff) | |
download | ffmpeg-13e35a25f6703a68cfede58e5e6ae455caaee8c3.tar.gz |
Merge commit '7ee191cab0dc44700f26c5784e2adeb6a779651b'
* commit '7ee191cab0dc44700f26c5784e2adeb6a779651b':
dv: Add a guard to not overread the ppcm array
See: 3669915e93b3df63034857534245c3f2575d78ff
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavformat/dv.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libavformat/dv.c b/libavformat/dv.c index cc48f483eb..e3b0d0a31e 100644 --- a/libavformat/dv.c +++ b/libavformat/dv.c @@ -113,7 +113,7 @@ static const int dv_audio_frequency[3] = { * 3. Audio is always returned as 16bit linear samples: 12bit nonlinear samples * are converted into 16bit linear ones. */ -static int dv_extract_audio(uint8_t *frame, uint8_t *ppcm[4], +static int dv_extract_audio(uint8_t *frame, uint8_t **ppcm, const DVprofile *sys) { int size, chan, i, j, d, of, smpls, freq, quant, half_ch; @@ -366,7 +366,7 @@ int avpriv_dv_produce_packet(DVDemuxContext *c, AVPacket *pkt, uint8_t *buf, int buf_size, int64_t pos) { int size, i; - uint8_t *ppcm[4] = { 0 }; + uint8_t *ppcm[5] = { 0 }; if (buf_size < DV_PROFILE_BYTES || !(c->sys = avpriv_dv_frame_profile(c->sys, buf, buf_size)) || |