]> granicus.if.org Git - postgis/commitdiff
Do not compare uninitialized memory (#1825)
authorSandro Santilli <strk@keybit.net>
Thu, 17 May 2012 13:36:44 +0000 (13:36 +0000)
committerSandro Santilli <strk@keybit.net>
Thu, 17 May 2012 13:36:44 +0000 (13:36 +0000)
May fix prepared geometry cache sub-uses (misses)

git-svn-id: http://svn.osgeo.org/postgis/trunk@9749 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/lwgeom_geos_prepared.c

index 18d620007eb6c5c5cd957770369ca5c62987138c..77391a7072bc1cc825a10ce3e55384646f7af98b 100644 (file)
@@ -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)
        {