[FFmpeg-cvslog] avfilter/ff_insert_pad: fix order of operations
Michael Niedermayer
git at videolan.org
Tue Dec 24 04:00:54 CET 2013
ffmpeg | branch: release/2.0 | Michael Niedermayer <michaelni at gmx.at> | Mon Oct 21 16:21:14 2013 +0200| [074ebfacf40f187069e90e1618a95926757ed7c8] | committer: Michael Niedermayer
avfilter/ff_insert_pad: fix order of operations
Fixes out of bounds access
Fixes CID732170
Fixes CID732169
No filter is known to use this function in a way so the issue can be reproduced.
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
(cherry picked from commit ab2bfb85d49b2f8aa505816f93e75fd18ad0a361)
Conflicts:
libavfilter/avfilter.c
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=074ebfacf40f187069e90e1618a95926757ed7c8
---
libavfilter/avfilter.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c
index c3228cd..251f6ae 100644
--- a/libavfilter/avfilter.c
+++ b/libavfilter/avfilter.c
@@ -110,8 +110,8 @@ void ff_insert_pad(unsigned idx, unsigned *count, size_t padidx_off,
(*count)++;
for (i = idx + 1; i < *count; i++)
- if (*links[i])
- (*(unsigned *)((uint8_t *) *links[i] + padidx_off))++;
+ if ((*links)[i])
+ (*(unsigned *)((uint8_t *) (*links)[i] + padidx_off))++;
}
int avfilter_link(AVFilterContext *src, unsigned srcpad,
More information about the ffmpeg-cvslog
mailing list