[postgis-commits] svn - r3611 - spike/wktraster/rt_core

postgis-commits at postgis.refractions.net postgis-commits at postgis.refractions.net
Mon Feb 2 06:53:37 PST 2009


Author: strk
Date: 2009-02-02 06:53:36 -0800 (Mon, 02 Feb 2009)
New Revision: 3611

Modified:
   spike/wktraster/rt_core/rt_api.c
Log:
warn about unparsed hexwkb

Modified: spike/wktraster/rt_core/rt_api.c
===================================================================
--- spike/wktraster/rt_core/rt_api.c	2009-02-02 14:29:30 UTC (rev 3610)
+++ spike/wktraster/rt_core/rt_api.c	2009-02-02 14:53:36 UTC (rev 3611)
@@ -1647,6 +1647,17 @@
 
     if ( ! rast->numBands )
     {
+        /* Here ptr should have been left to right after last used byte */
+        if (ptr < wkbend)
+        {
+            ctx->info("%d bytes of WKB remained unparsed", wkbend-ptr);
+        }
+        else if ( ptr > wkbend )
+        {
+            /* Easier to get a segfault before I guess */
+            ctx->warn("We parsed %d bytes more then available!",
+                ptr-wkbend);
+        }
         return rast;
     }
 



More information about the postgis-commits mailing list