[postgis-tickets] [PostGIS] #2856: broken varint encoding ?
PostGIS
trac at osgeo.org
Tue Jul 29 03:29:52 PDT 2014
#2856: broken varint encoding ?
---------------------+------------------------------------------------------
Reporter: strk | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.2.0
Component: postgis | Version: trunk
Keywords: |
---------------------+------------------------------------------------------
With r12836 I moved varint encoding code in its own module and added more
tests, starting with examples found on the varint documentation page
https://developers.google.com/protocol-buffers/docs/encoding#varints
In doing so I found that the encoding for the signed integers 2147483647
and -2147483648 were wrong. In particular the "size" detector correctly
says it takes 4 bytes to encode those numbers
but the encoder (or hexbytes_from_bytes) ends up returning an hex
representing 5 bytes instead.
See
http://trac.osgeo.org/postgis/browser/trunk/liblwgeom/cunit/cu_varint.c?rev=12836#L87
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/2856>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list