]> granicus.if.org Git - postgis/commitdiff
Resolve scan-build strncat warning
authorDaniel Baston <dbaston@gmail.com>
Tue, 7 Jun 2016 12:57:22 +0000 (12:57 +0000)
committerDaniel Baston <dbaston@gmail.com>
Tue, 7 Jun 2016 12:57:22 +0000 (12:57 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@14938 b70326c6-7e19-0410-871a-916f4a2858ee

postgis/lwgeom_ogc.c

index 3e868aab710b9d935b16e65dca82913414c30a0b..3db1744a1c64cec4e036d583803121996b42b682 100644 (file)
@@ -177,8 +177,8 @@ Datum geometry_geometrytype(PG_FUNCTION_ARGS)
 {
        GSERIALIZED *gser;
        text *type_text;
-       static int type_str_len = 32;
-       char type_str[type_str_len];
+       static int type_str_len = 31;
+       char type_str[type_str_len + 1];
 
        /* Read just the header from the toasted tuple */
        gser = PG_GETARG_GSERIALIZED_P_SLICE(0, 0, gserialized_max_header_size());