From: Sandro Santilli Date: Thu, 17 May 2012 13:36:44 +0000 (+0000) Subject: Do not compare uninitialized memory (#1825) X-Git-Tag: 2.0.1~68 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b4aec2845ad5c4421cc5fdde5d672590a7fdc22f;p=postgis Do not compare uninitialized memory (#1825) May fix prepared geometry cache sub-uses (misses) git-svn-id: http://svn.osgeo.org/postgis/trunk@9749 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/postgis/lwgeom_geos_prepared.c b/postgis/lwgeom_geos_prepared.c index 18d620007..77391a707 100644 --- a/postgis/lwgeom_geos_prepared.c +++ b/postgis/lwgeom_geos_prepared.c @@ -290,10 +290,10 @@ GetPrepGeomCache(FunctionCallInfoData *fcinfo, GSERIALIZED *pg_geom1, GSERIALIZE CreatePrepGeomHash(); if ( pg_geom1 ) - pg_geom1_size = VARSIZE(pg_geom1) + VARHDRSZ; + pg_geom1_size = VARSIZE(pg_geom1); if ( pg_geom2 ) - pg_geom2_size = VARSIZE(pg_geom2) + VARHDRSZ; + pg_geom2_size = VARSIZE(pg_geom2); if ( cache == NULL) {