We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 240a724 commit 825c0c7Copy full SHA for 825c0c7
src/pngchunk_int.cpp
@@ -22,6 +22,8 @@
22
#include "config.h"
23
24
#ifdef EXV_HAVE_LIBZ
25
+#include <zlib.h> // To uncompress or compress text chunk
26
+
27
#include "enforce.hpp"
28
#include "error.hpp"
29
#include "exif.hpp"
@@ -33,8 +35,6 @@
33
35
#include "safe_op.hpp"
34
36
#include "tiffimage.hpp"
37
-#include <zlib.h> // To uncompress or compress text chunk
-
38
// standard includes
39
#include <algorithm>
40
#include <cassert>
@@ -108,7 +108,7 @@ namespace Exiv2
108
// Search for null char until the end of the DataBuf
109
const byte* dataPtr = data.c_data();
110
int keysize = offset;
111
- while (dataPtr[keysize] != 0 && keysize < data.size()) {
+ while (keysize < data.size() && dataPtr[keysize] != 0) {
112
keysize++;
113
}
114
0 commit comments