diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-11-11 08:14:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-11-11 08:14:06 +0300 |
commit | 2d60845786aeab099c61ffa42b7f72cccc68bff1 (patch) | |
tree | aa3f17a33f029f9a8de69b081d219ee506e71f8e /source/blender/imbuf/intern/cineon | |
parent | 99f56b4c16323f96c0cbf54e392fb509fcac5bda (diff) |
Cleanup: pass header size to 'is_a' callbacks
No functional changes, prepare for fixing out-of-bounds access
when reading headers.
Diffstat (limited to 'source/blender/imbuf/intern/cineon')
-rw-r--r-- | source/blender/imbuf/intern/cineon/cineon_dpx.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/imbuf/intern/cineon/cineon_dpx.c b/source/blender/imbuf/intern/cineon/cineon_dpx.c index 7907d648abe..8bbd9fbb285 100644 --- a/source/blender/imbuf/intern/cineon/cineon_dpx.c +++ b/source/blender/imbuf/intern/cineon/cineon_dpx.c @@ -188,7 +188,7 @@ bool imb_save_cineon(struct ImBuf *buf, const char *filepath, int flags) return imb_save_dpx_cineon(buf, filepath, 1, flags); } -int imb_is_a_cineon(const unsigned char *buf) +bool imb_is_a_cineon(const unsigned char *buf, size_t UNUSED(size)) { return logImageIsCineon(buf); } @@ -198,7 +198,7 @@ ImBuf *imb_load_cineon(const unsigned char *mem, int flags, char colorspace[IM_MAX_SPACE]) { - if (imb_is_a_cineon(mem)) { + if (imb_is_a_cineon(mem, size)) { return imb_load_dpx_cineon(mem, size, 1, flags, colorspace); } return NULL; @@ -209,7 +209,7 @@ bool imb_save_dpx(struct ImBuf *buf, const char *filepath, int flags) return imb_save_dpx_cineon(buf, filepath, 0, flags); } -int imb_is_a_dpx(const unsigned char *buf) +bool imb_is_a_dpx(const unsigned char *buf, size_t UNUSED(size)) { return logImageIsDpx(buf); } @@ -219,7 +219,7 @@ ImBuf *imb_load_dpx(const unsigned char *mem, int flags, char colorspace[IM_MAX_SPACE]) { - if (imb_is_a_dpx(mem)) { + if (imb_is_a_dpx(mem, size)) { return imb_load_dpx_cineon(mem, size, 0, flags, colorspace); } return NULL; |