Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions tools/osmpbf-outline.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,12 @@ int main(int argc, char *argv[]) {
debug(" contains zlib-compressed data: %u bytes", sz);
debug(" uncompressed size: %u bytes", blob.raw_size());

// ensure the raw_size fits into the unpack_buffer, otherwise
// zlib would inflate past the end of the fixed-size buffer
if (blob.raw_size() < 0 || blob.raw_size() > OSMPBF::max_uncompressed_blob_size) {
err(" raw_size is bigger then allowed (%d > %u)", blob.raw_size(), OSMPBF::max_uncompressed_blob_size);
}

// zlib information
z_stream z;

Expand Down
Loading