]> granicus.if.org Git - postgis/commitdiff
Fix pointer problem in the new HINT code caused by strncpy() not padding with zeros...
authorMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Wed, 15 Oct 2008 21:44:19 +0000 (21:44 +0000)
committerMark Cave-Ayland <mark.cave-ayland@siriusit.co.uk>
Wed, 15 Oct 2008 21:44:19 +0000 (21:44 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@3117 b70326c6-7e19-0410-871a-916f4a2858ee

lwgeom/lwgeom_pg.c

index 986f9b699aa695e8919647ed20fbb2ed7cd1777a..73deb426f64b5492e47bb34563ee752362055a90 100644 (file)
@@ -44,7 +44,7 @@ pg_parser_errhint(LWGEOM_PARSER_RESULT *lwg_parser_result)
 
        /* If we are not at the start of the buffer, prefix with "..." */
        if (hintstart != lwg_parser_result->wkinput)
-               strncpy(hintbuffer, "...", 3);
+               strncpy(hintbuffer, "...", 4);
        
        /* Append to the existing string */
        strncat(hintbuffer, hintstart, hintfinish-hintstart);