[postgis-tickets] [PostGIS] #3786: OSS FUZZ fixes

PostGIS trac at osgeo.org
Fri Jul 14 12:21:40 PDT 2017


#3786: OSS FUZZ fixes
----------------------+---------------------------
  Reporter:  robe     |      Owner:  pramsey
      Type:  defect   |     Status:  new
  Priority:  medium   |  Milestone:  PostGIS 2.4.0
 Component:  postgis  |    Version:  trunk
Resolution:           |   Keywords:
----------------------+---------------------------

Comment (by robe):

 Here is the thing I don't get about cc'.

 The _cp code returns 0 in case of empty I presume, but what exactly does
 that mean when return type expected is const POINT2D.

 http://postgis.net/docs/doxygen/2.4/da/de7/liblwgeom_8h_ab943e4f240882f2b76341a2948778d2d.html#ab943e4f240882f2b76341a2948778d2d

 Do all 0s evaluate as nothing?


 {{{
 if ( ! pa ) return 0;
   488
   489         if ( (n<0) || (n>=pa->npoints))
   490         {
   491                 lwerror("getPoint2D_const_p: point offset out of
 range");
   492                 return 0; /*error */
   493         }
 }}}

 As far as lwerror goes, doesn't that always hold execution of the
 function.  I've never seen an lwerror show up in PostgreSQL where my
 function wasn't killed.  So I presume I don't need to worry about catching
 that.

--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/3786#comment:2>
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