summaryrefslogtreecommitdiffstats
path: root/src/ufodecode.c
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2017-02-24 16:29:20 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2017-06-20 09:27:48 +0200
commitd276bc6a82fb2285eccd49ad3665988a0a19040b (patch)
treee4844e1b6b3a005325d8f1c130d6d47f225a9306 /src/ufodecode.c
parent508435541810172d1e6d3d684e1e081096233d97 (diff)
downloadlibufodecode-d276bc6a82fb2285eccd49ad3665988a0a19040b.tar.gz
libufodecode-d276bc6a82fb2285eccd49ad3665988a0a19040b.tar.bz2
libufodecode-d276bc6a82fb2285eccd49ad3665988a0a19040b.tar.xz
libufodecode-d276bc6a82fb2285eccd49ad3665988a0a19040b.zip
Require at least a 4K block for decoding
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)