[postgis-tickets] [PostGIS] #3970: Undefined behaviour in lwcollection.c and lwpoly.c

PostGIS trac at osgeo.org
Thu Jan 4 09:01:54 PST 2018


#3970: Undefined behaviour in lwcollection.c and lwpoly.c
------------------------+---------------------------
 Reporter:  Algunenano  |      Owner:  strk
     Type:  defect      |     Status:  new
 Priority:  medium      |  Milestone:  PostGIS 2.5.0
Component:  liblwgeom   |    Version:  trunk
 Keywords:              |
------------------------+---------------------------
 Detected with clang -fsanizite=integer
 {{{
 lwcollection.c:249:12: runtime error: unsigned integer overflow: 0 - 1
 cannot be represented in type 'uint32_t' (aka 'unsigned int')
 lwpoly.c:322:12: runtime error: unsigned integer overflow: 0 - 1 cannot be
 represented in type 'uint32_t' (aka 'unsigned int')
 }}}
 GH PR: https://github.com/postgis/postgis/pull/183
 For the same price, I've removed some other warnings related to unsigned -
 signed comparison.

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3970>
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