OSDN Git Service
(root)
/
android-x86
/
external-ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab87df9
)
avfilter/vsrc_testsrc: draw_bar: make sure width is not negative
author
Paul B Mahol
<onemda@gmail.com>
Thu, 15 Dec 2016 14:52:48 +0000
(15:52 +0100)
committer
Paul B Mahol
<onemda@gmail.com>
Thu, 15 Dec 2016 15:03:48 +0000
(16:03 +0100)
Reported-by: Josh de Kock
Signed-off-by: Paul B Mahol <onemda@gmail.com>
libavfilter/vsrc_testsrc.c
patch
|
blob
|
history
diff --git
a/libavfilter/vsrc_testsrc.c
b/libavfilter/vsrc_testsrc.c
index
08f6e07
..
422f6d8
100644
(file)
--- a/
libavfilter/vsrc_testsrc.c
+++ b/
libavfilter/vsrc_testsrc.c
@@
-1309,8
+1309,8
@@
static void draw_bar(TestSourceContext *test, const uint8_t color[4],
x = FFMIN(x, test->w - 1);
y = FFMIN(y, test->h - 1);
- w = FFM
IN(w, test->w - x
);
- h = FFM
IN(h, test->h - y
);
+ w = FFM
AX(FFMIN(w, test->w - x), 0
);
+ h = FFM
AX(FFMIN(h, test->h - y), 0
);
av_assert0(x + w <= test->w);
av_assert0(y + h <= test->h);