diff --git a/CMakeLists.txt b/CMakeLists.txt index a2e3360d..b02c9c24 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -20,8 +20,8 @@ endif() set(ROARING_LIB_NAME roaring) set(PROJECT_VERSION_MAJOR 4) set(PROJECT_VERSION_MINOR 1) -set(PROJECT_VERSION_PATCH 2) -set(ROARING_LIB_VERSION "4.1.2" CACHE STRING "Roaring library version") +set(PROJECT_VERSION_PATCH 3) +set(ROARING_LIB_VERSION "4.1.3" CACHE STRING "Roaring library version") set(ROARING_LIB_SOVERSION "16" CACHE STRING "Roaring library soversion") option(ROARING_EXCEPTIONS "Enable exception-throwing interface" ON) diff --git a/doxygen b/doxygen index 7759cb0e..327d5def 100644 --- a/doxygen +++ b/doxygen @@ -48,7 +48,7 @@ PROJECT_NAME = "CRoaring" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = "4.1.2" +PROJECT_NUMBER = "4.1.3" # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/include/roaring/roaring_version.h b/include/roaring/roaring_version.h index 0d136bbb..df67022b 100644 --- a/include/roaring/roaring_version.h +++ b/include/roaring/roaring_version.h @@ -2,11 +2,11 @@ // /include/roaring/roaring_version.h automatically generated by release.py, do not change by hand #ifndef ROARING_INCLUDE_ROARING_VERSION #define ROARING_INCLUDE_ROARING_VERSION -#define ROARING_VERSION "4.1.2" +#define ROARING_VERSION "4.1.3" enum { ROARING_VERSION_MAJOR = 4, ROARING_VERSION_MINOR = 1, - ROARING_VERSION_REVISION = 2 + ROARING_VERSION_REVISION = 3 }; #endif // ROARING_INCLUDE_ROARING_VERSION // clang-format on \ No newline at end of file diff --git a/src/roaring64.c b/src/roaring64.c index e63d3d96..c4d7b74d 100644 --- a/src/roaring64.c +++ b/src/roaring64.c @@ -1954,6 +1954,7 @@ roaring64_bitmap_t *roaring64_bitmap_portable_deserialize_safe( roaring64_bitmap_t *r = roaring64_bitmap_create(); // Iterate through buckets ordered by increasing keys. + int64_t previous_high32 = -1; for (uint64_t bucket = 0; bucket < buckets; ++bucket) { // Read as uint32 the most significant 32 bits of the bucket. uint32_t high32; @@ -1964,7 +1965,10 @@ roaring64_bitmap_t *roaring64_bitmap_portable_deserialize_safe( memcpy(&high32, buf, sizeof(high32)); buf += sizeof(high32); read_bytes += sizeof(high32); - + if(high32 < previous_high32) { + roaring64_bitmap_free(r); + return NULL; + } // Read the 32-bit Roaring bitmaps representing the least significant // bits of a set of elements. size_t bitmap32_size = roaring_bitmap_portable_deserialize_size(