Message ID | 20200420220341.7729-1-michael@niedermayer.cc |
---|---|
State | Accepted |
Commit | bc41a29a5aa3c3dedba0a85b4aeb79a07eeeb1b4 |
Headers | show |
Series | [FFmpeg-devel,1/3] avcodec/iff: Fix invalid pointer intermediates in decode_deep_rle32() | expand |
Context | Check | Description |
---|---|---|
andriy/default | pending | |
andriy/make | success | Make finished |
andriy/make_fate | success | Make fate finished |
On Tue, Apr 21, 2020 at 12:03:39AM +0200, Michael Niedermayer wrote: > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > --- > libavcodec/iff.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/libavcodec/iff.c b/libavcodec/iff.c > index acd6519b06..2e65e266d0 100644 > --- a/libavcodec/iff.c > +++ b/libavcodec/iff.c > @@ -715,7 +715,7 @@ static void decode_deep_rle32(uint8_t *dst, const uint8_t *src, int src_size, in > { > const uint8_t *src_end = src + src_size; > int x = 0, y = 0, i; > - while (src + 5 <= src_end) { > + while (src_end - src >= 5) { > int opcode; > opcode = *(int8_t *)src++; > if (opcode >= 0) { > -- > 2.17.1 looks good. please apply. -- Peter (A907 E02F A6E5 0CD2 34CD 20D2 6760 79C5 AC40 DD6B)
On Wed, Apr 22, 2020 at 08:07:21PM +1000, Peter Ross wrote: > On Tue, Apr 21, 2020 at 12:03:39AM +0200, Michael Niedermayer wrote: > > Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> > > --- > > libavcodec/iff.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/libavcodec/iff.c b/libavcodec/iff.c > > index acd6519b06..2e65e266d0 100644 > > --- a/libavcodec/iff.c > > +++ b/libavcodec/iff.c > > @@ -715,7 +715,7 @@ static void decode_deep_rle32(uint8_t *dst, const uint8_t *src, int src_size, in > > { > > const uint8_t *src_end = src + src_size; > > int x = 0, y = 0, i; > > - while (src + 5 <= src_end) { > > + while (src_end - src >= 5) { > > int opcode; > > opcode = *(int8_t *)src++; > > if (opcode >= 0) { > > -- > > 2.17.1 > > looks good. please apply. will apply thx [...]
diff --git a/libavcodec/iff.c b/libavcodec/iff.c index acd6519b06..2e65e266d0 100644 --- a/libavcodec/iff.c +++ b/libavcodec/iff.c @@ -715,7 +715,7 @@ static void decode_deep_rle32(uint8_t *dst, const uint8_t *src, int src_size, in { const uint8_t *src_end = src + src_size; int x = 0, y = 0, i; - while (src + 5 <= src_end) { + while (src_end - src >= 5) { int opcode; opcode = *(int8_t *)src++; if (opcode >= 0) {
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc> --- libavcodec/iff.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)