On Sun, 29 Sep 2013, Luca Barbato wrote:
On 29/09/13 00:28, Martin Storsjö wrote:
We read 2 bytes for 15 out of 16 pixels, therefore we need to
have at least 30 bytes, not 16.
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
CC: [email protected]
---
libavcodec/rpza.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/rpza.c b/libavcodec/rpza.c
index 45350a8..ca9f7ea 100644
--- a/libavcodec/rpza.c
+++ b/libavcodec/rpza.c
@@ -204,7 +204,7 @@ static void rpza_decode_stream(RpzaContext *s)
/* Fill block with 16 colors */
case 0x00:
- if (s->size - stream_ptr < 16)
+ if (s->size - stream_ptr < 30)
return;
Ok, BLOCK_SIZE might be a good name for it.
I'm not sure how necessary it is, since there's a number of different
blocks and this just happens to be the size of one of them, used only
once.
// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel