[Git][debian-gis-team/protozero][stretch-backports] 10 commits: New upstream version 1.6.6

Bas Couwenberg gitlab at salsa.debian.org
Sun Mar 3 07:30:33 GMT 2019


Bas Couwenberg pushed to branch stretch-backports at Debian GIS Project / protozero


Commits:
e77fe248 by Bas Couwenberg at 2019-02-21T05:55:47Z
New upstream version 1.6.6
- - - - -
43816889 by Bas Couwenberg at 2019-02-21T05:55:49Z
Merge tag 'upstream/1.6.6'

Upstream version 1.6.6

- - - - -
9ea646a6 by Bas Couwenberg at 2019-02-21T05:56:04Z
New upstream release.

- - - - -
5be741c6 by Bas Couwenberg at 2019-02-21T05:56:39Z
Set distribution to unstable.

- - - - -
18ff78a0 by Bas Couwenberg at 2019-02-21T11:00:09Z
New upstream version 1.6.7
- - - - -
87fd9172 by Bas Couwenberg at 2019-02-21T11:00:11Z
Merge tag 'upstream/1.6.7'

Upstream version 1.6.7

- - - - -
b77546dc by Bas Couwenberg at 2019-02-21T11:00:23Z
New upstream release.

- - - - -
df1dbdb6 by Bas Couwenberg at 2019-02-21T11:00:52Z
Set distribution to unstable.

- - - - -
33203cf1 by Bas Couwenberg at 2019-03-03T07:21:40Z
Merge tag 'debian/1.6.7-1' into stretch-backports

- - - - -
f16087ed by Bas Couwenberg at 2019-03-03T07:21:47Z
Rebuild for stretch-backports.

- - - - -


7 changed files:

- CHANGELOG.md
- CMakeLists.txt
- debian/changelog
- include/protozero/pbf_reader.hpp
- include/protozero/version.hpp
- test/unit/test_basic.cpp
- test/unit/test_varint.cpp


Changes:

=====================================
CHANGELOG.md
=====================================
@@ -15,6 +15,20 @@ This project adheres to [Semantic Versioning](http://semver.org/).
 ### Fixed
 
 
+## [1.6.7] - 2018-02-21
+
+### Fixed
+
+- Signed-unsigned comparison on 32 bit systems.
+
+
+## [1.6.6] - 2018-02-20
+
+### Fixed
+
+- Fixed several place with possible undefined behaviour.
+
+
 ## [1.6.5] - 2018-02-05
 
 ### Fixed
@@ -339,7 +353,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
 - Make pbf reader and writer code endianess-aware.
 
 
-[unreleased]: https://github.com/osmcode/libosmium/compare/v1.6.5...HEAD
+[unreleased]: https://github.com/osmcode/libosmium/compare/v1.6.6...HEAD
+[1.6.5]: https://github.com/osmcode/libosmium/compare/v1.6.5...v1.6.6
 [1.6.5]: https://github.com/osmcode/libosmium/compare/v1.6.4...v1.6.5
 [1.6.4]: https://github.com/osmcode/libosmium/compare/v1.6.3...v1.6.4
 [1.6.3]: https://github.com/osmcode/libosmium/compare/v1.6.2...v1.6.3


=====================================
CMakeLists.txt
=====================================
@@ -14,7 +14,7 @@ project(protozero)
 
 set(PROTOZERO_VERSION_MAJOR 1)
 set(PROTOZERO_VERSION_MINOR 6)
-set(PROTOZERO_VERSION_PATCH 5)
+set(PROTOZERO_VERSION_PATCH 7)
 
 set(PROTOZERO_VERSION
     "${PROTOZERO_VERSION_MAJOR}.${PROTOZERO_VERSION_MINOR}.${PROTOZERO_VERSION_PATCH}")


=====================================
debian/changelog
=====================================
@@ -1,3 +1,21 @@
+protozero (1.6.7-1~bpo9+1) stretch-backports; urgency=medium
+
+  * Rebuild for stretch-backports.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Sun, 03 Mar 2019 08:21:43 +0100
+
+protozero (1.6.7-1) unstable; urgency=medium
+
+  * New upstream release.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Thu, 21 Feb 2019 12:00:42 +0100
+
+protozero (1.6.6-1) unstable; urgency=medium
+
+  * New upstream release.
+
+ -- Bas Couwenberg <sebastic at debian.org>  Thu, 21 Feb 2019 06:56:30 +0100
+
 protozero (1.6.5-1~bpo9+1) stretch-backports; urgency=medium
 
   * Rebuild for stretch-backports.


=====================================
include/protozero/pbf_reader.hpp
=====================================
@@ -99,7 +99,6 @@ class pbf_reader {
     template <typename T>
     T get_varint() {
         const auto val = static_cast<T>(decode_varint(&m_data, m_end));
-        assert(m_data <= m_end);
         return val;
     }
 
@@ -114,7 +113,7 @@ class pbf_reader {
     }
 
     void skip_bytes(pbf_length_type len) {
-        if (m_data + len > m_end) {
+        if (m_end - m_data < static_cast<ptrdiff_t>(len)) {
             throw end_of_buffer_exception{};
         }
         m_data += len;
@@ -244,7 +243,7 @@ public:
      * read.
      */
     operator bool() const noexcept { // NOLINT(google-explicit-constructor, hicpp-explicit-conversions)
-        return m_data < m_end;
+        return m_data != m_end;
     }
 
     /**
@@ -478,7 +477,6 @@ public:
             default:
                 break;
         }
-        assert(m_data <= m_end);
     }
 
     ///@{


=====================================
include/protozero/version.hpp
=====================================
@@ -23,12 +23,12 @@ documentation.
 #define PROTOZERO_VERSION_MINOR 6
 
 /// The patch number
-#define PROTOZERO_VERSION_PATCH 5
+#define PROTOZERO_VERSION_PATCH 7
 
 /// The complete version number
 #define PROTOZERO_VERSION_CODE (PROTOZERO_VERSION_MAJOR * 10000 + PROTOZERO_VERSION_MINOR * 100 + PROTOZERO_VERSION_PATCH)
 
 /// Version number as string
-#define PROTOZERO_VERSION_STRING "1.6.5"
+#define PROTOZERO_VERSION_STRING "1.6.7"
 
 #endif // PROTOZERO_VERSION_HPP


=====================================
test/unit/test_basic.cpp
=====================================
@@ -49,10 +49,10 @@ TEST_CASE("empty buffer in pbf_reader is okay") {
 }
 
 TEST_CASE("check every possible value for single byte in buffer") {
-    char buffer;
+    char buffer[1];
     for (int i = 0; i <= 255; ++i) {
-        buffer = static_cast<char>(i);
-        protozero::pbf_reader item{&buffer, 1};
+        buffer[0] = static_cast<char>(i);
+        protozero::pbf_reader item{buffer, 1};
 
         REQUIRE(item.length() == 1);
         REQUIRE_FALSE(!item); // test operator bool()
@@ -61,9 +61,9 @@ TEST_CASE("check every possible value for single byte in buffer") {
 }
 
 TEST_CASE("next() should throw when illegal wire type is encountered") {
-    const char buffer = 1u << 3u | 7u;
+    const char buffer[1] = {1u << 3u | 7u};
 
-    protozero::pbf_reader item{&buffer, 1};
+    protozero::pbf_reader item{buffer, 1};
     REQUIRE_THROWS_AS(item.next(), const protozero::unknown_pbf_wire_type_exception&);
 }
 


=====================================
test/unit/test_varint.cpp
=====================================
@@ -191,17 +191,17 @@ TEST_CASE("skip_varint with empty buffer throws") {
 }
 
 TEST_CASE("call skip_varint with every possible value for single byte in buffer") {
-    char buffer;
+    char buffer[1];
     for (int i = 0; i <= 127; ++i) {
-        buffer = static_cast<char>(i);
-        const char* b = &buffer;
-        protozero::skip_varint(&b, &buffer + 1);
-        REQUIRE(b == &buffer + 1);
+        buffer[0] = static_cast<char>(i);
+        const char* b = buffer;
+        protozero::skip_varint(&b, buffer + 1);
+        REQUIRE(b == buffer + 1);
     }
     for (int i = 128; i <= 255; ++i) {
-        buffer = static_cast<char>(i);
-        const char* b = &buffer;
-        REQUIRE_THROWS_AS(protozero::skip_varint(&b, &buffer + 1), const protozero::end_of_buffer_exception&);
+        buffer[0] = static_cast<char>(i);
+        const char* b = buffer;
+        REQUIRE_THROWS_AS(protozero::skip_varint(&b, buffer + 1), const protozero::end_of_buffer_exception&);
     }
 }
 
@@ -211,19 +211,19 @@ TEST_CASE("decode_varint with empty buffer throws") {
 }
 
 TEST_CASE("call decode_varint with every possible value for single byte in buffer") {
-    char buffer;
+    char buffer[1];
     for (int i = 0; i <= 127; ++i) {
         REQUIRE(protozero::length_of_varint(i) == 1);
-        buffer = static_cast<char>(i);
-        const char* b = &buffer;
-        REQUIRE(protozero::decode_varint(&b, &buffer + 1) == i);
-        REQUIRE(b == &buffer + 1);
+        buffer[0] = static_cast<char>(i);
+        const char* b = buffer;
+        REQUIRE(protozero::decode_varint(&b, buffer + 1) == i);
+        REQUIRE(b == buffer + 1);
     }
     for (int i = 128; i <= 255; ++i) {
         REQUIRE(protozero::length_of_varint(i) == 2);
-        buffer = static_cast<char>(i);
-        const char* b = &buffer;
-        REQUIRE_THROWS_AS(protozero::decode_varint(&b, &buffer + 1), const protozero::end_of_buffer_exception&);
+        buffer[0] = static_cast<char>(i);
+        const char* b = buffer;
+        REQUIRE_THROWS_AS(protozero::decode_varint(&b, buffer + 1), const protozero::end_of_buffer_exception&);
     }
 }
 



View it on GitLab: https://salsa.debian.org/debian-gis-team/protozero/compare/b0dfd58dd7a9c758f49dfb6ae732e11cae5b44c9...f16087ed082b2081bab0f4425332d0187e718424

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/protozero/compare/b0dfd58dd7a9c758f49dfb6ae732e11cae5b44c9...f16087ed082b2081bab0f4425332d0187e718424
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20190303/b854c1d7/attachment-0001.html>


More information about the Pkg-grass-devel mailing list