summaryrefslogtreecommitdiffstats
path: root/src/ufodecode.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ufodecode.c')
-rw-r--r--src/ufodecode.c2
1 files changed, 1 insertions, 1 deletions
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)