diff options
author | Lode <lvandeve@gmail.com> | 2018-01-15 01:26:30 +0100 |
---|---|---|
committer | Lode <lvandeve@gmail.com> | 2018-01-15 01:26:30 +0100 |
commit | d4d8f1aa786571af4a90a41b3db048043f114629 (patch) | |
tree | 9e40c8741cc3b6fa632b4bc3dd1fe8a5ad524358 /lodepng_util.cpp | |
parent | c7bb19ad54a53f0d9917da37de7288b1aadf6d0f (diff) |
allow optionally ignoring a few more recoverable errors
Diffstat (limited to 'lodepng_util.cpp')
-rw-r--r-- | lodepng_util.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lodepng_util.cpp b/lodepng_util.cpp index 76efdea..9d86686 100644 --- a/lodepng_util.cpp +++ b/lodepng_util.cpp @@ -1,7 +1,7 @@ /* LodePNG Utils -Copyright (c) 2005-2014 Lode Vandevenne +Copyright (c) 2005-2018 Lode Vandevenne This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -52,9 +52,9 @@ unsigned getChunkInfo(std::vector<std::string>& names, std::vector<size_t>& size if(std::string(type).size() != 4) return 1; unsigned length = lodepng_chunk_length(chunk); - if(chunk + length + 12 > end) return 1; names.push_back(type); sizes.push_back(length); + if(chunk + length + 12 > end) return 1; next = lodepng_chunk_next_const(chunk); if (next <= chunk) return 1; // integer overflow |