[FFmpeg-cvslog] lavfi/audio: fix an invalid boundary check.

Nicolas George git at videolan.org
Thu Sep 13 12:03:57 CEST 2012


ffmpeg | branch: release/0.11 | Nicolas George <nicolas.george at normalesup.org> | Wed Sep 12 19:33:42 2012 +0200| [3593f577b0ac9dd77e3fa83f6dde6280e67fa2ab] | committer: Nicolas George

lavfi/audio: fix an invalid boundary check.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3593f577b0ac9dd77e3fa83f6dde6280e67fa2ab
---

 libavfilter/audio.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/audio.c b/libavfilter/audio.c
index 0616f97..2e62506 100644
--- a/libavfilter/audio.c
+++ b/libavfilter/audio.c
@@ -204,7 +204,7 @@ void ff_filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref)
         link->cur_buf->audio->sample_rate = samplesref->audio->sample_rate;
 
         /* Copy actual data into new samples buffer */
-        for (i = 0; samplesref->data[i] && i < 8; i++)
+        for (i = 0; i < 8 && samplesref->data[i]; i++)
             memcpy(link->cur_buf->data[i], samplesref->data[i], samplesref->linesize[0]);
         for (i = 0; i < planes; i++)
             memcpy(link->cur_buf->extended_data[i], samplesref->extended_data[i], samplesref->linesize[0]);



More information about the ffmpeg-cvslog mailing list