diff --git a/TinyEXIF.cpp b/TinyEXIF.cpp index 3cf1ed8..348257f 100644 --- a/TinyEXIF.cpp +++ b/TinyEXIF.cpp @@ -301,7 +301,7 @@ public: if (value[num_components-1] == '\0') value.resize(num_components-1); } else - if (base+data+num_components <= len) { + if ((uint64_t)base+data+num_components <= (uint64_t)len) { const char* const sz((const char*)buf+base+data); unsigned num(0); while (num < num_components && sz[num] != '\0')