From d276bc6a82fb2285eccd49ad3665988a0a19040b Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Fri, 24 Feb 2017 16:29:20 +0100 Subject: Require at least a 4K block for decoding --- src/ufodecode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/ufodecode.c') diff --git a/src/ufodecode.c b/src/ufodecode.c index a00ac9f..a3c07ec 100644 --- a/src/ufodecode.c +++ b/src/ufodecode.c @@ -531,7 +531,7 @@ ufo_decoder_get_next_frame (UfoDecoder *decoder, uint16_t **pixels, UfoDecoderMe if (pixels == NULL) return 0; - if (pos >= num_words) + if ((pos >= num_words) || ((num_words - pos) < 4096)) return EIO; if (num_words < 16) -- cgit v1.2.3