diff options
Diffstat (limited to 'source/blender/imbuf/intern/iris.c')
-rw-r--r-- | source/blender/imbuf/intern/iris.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/imbuf/intern/iris.c b/source/blender/imbuf/intern/iris.c index 112b95bf1a1..547af472d73 100644 --- a/source/blender/imbuf/intern/iris.c +++ b/source/blender/imbuf/intern/iris.c @@ -270,11 +270,13 @@ struct ImBuf *imb_loadiris(const uchar *mem, size_t size, int flags, char colors ImBuf *ibuf = NULL; uchar dirty_flag = 0; - if (size < HEADER_SIZE) { + if (!imb_is_a_iris(mem, size)) { return NULL; } - if (!imb_is_a_iris(mem, size)) { + /* Could pe part of the magic check above, + * by convention this check only requests the size needed to read it's magic though. */ + if (size < HEADER_SIZE) { return NULL; } |