From: Paul Ramsey Date: Tue, 10 Oct 2017 22:54:15 +0000 (+0000) Subject: Fix up return type X-Git-Tag: 2.5.0alpha~417 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7a056c8019561045fe7ccc3f7de28d83f92520a9;p=postgis Fix up return type git-svn-id: http://svn.osgeo.org/postgis/trunk@15963 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/liblwgeom/lwin_wkb.c b/liblwgeom/lwin_wkb.c index e01275d31..676520c75 100644 --- a/liblwgeom/lwin_wkb.c +++ b/liblwgeom/lwin_wkb.c @@ -28,6 +28,7 @@ #include "liblwgeom_internal.h" /* NOTE: includes lwgeom_log.h */ #include "lwgeom_log.h" #include +#include /** * Used for passing the parse state between the parsing functions. @@ -335,14 +336,14 @@ static POINTARRAY* ptarray_from_wkb_state(wkb_parse_state *s) size_t pa_size; uint32_t ndims = 2; uint32_t npoints = 0; - static uint32_t maxpoints = 4294967295 / WKB_DOUBLE_SIZE / 4; + static uint32_t maxpoints = UINT_MAX / WKB_DOUBLE_SIZE / 4; /* Calculate the size of this point array. */ npoints = integer_from_wkb_state(s); if (npoints > maxpoints) { lwerror("Pointarray length (%d) is too large"); - return; + return NULL; } LWDEBUGF(4,"Pointarray has %d points", npoints);