From 6f29915045ca1d1ad6dd8b47c5bbac552ffe6ded Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 20 Aug 2018 14:24:22 +0200 Subject: [PATCH] remove useless check for very larg files, found by coverity --- rtengine/dcraw.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rtengine/dcraw.cc b/rtengine/dcraw.cc index 127a2aeb8..da66bd6d8 100644 --- a/rtengine/dcraw.cc +++ b/rtengine/dcraw.cc @@ -8937,7 +8937,9 @@ void CLASS identify() for (i=0; i < 0x10000; i++) curve[i] = i; flen = fsize = ifp->size; - /*RT*/ if (fsize<100000 || fsize > 0x7fffffff) { + + // currently fsize is of type signed int which means for files larger than 0x7fffffff byte fsize will be < 0. We need to check for large files if we change the type to unsigned int + /*RT*/ if (fsize<100000) { is_raw = 0; return; }