From: martin-s Date: Thu, 4 Sep 2008 16:52:31 +0000 (+0000) Subject: Fix:Tools:Fixed segfault in osm2navit X-Git-Tag: navit-0.5.0.5194svn~3790 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b9d216eaee179cd411e8547edc75946250eee716;p=profile%2Fivi%2Fnavit.git Fix:Tools:Fixed segfault in osm2navit git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@1366 ffa7fe5e-494d-0410-b361-a75ebd5db220 --- diff --git a/navit/navit/osm2navit.c b/navit/navit/osm2navit.c index 26873b9..7d8731b 100644 --- a/navit/navit/osm2navit.c +++ b/navit/navit/osm2navit.c @@ -1468,7 +1468,7 @@ phase1_db(char *dbstr, FILE *out_ways, FILE *out_nodes) } #endif -static char buffer[150000]; +static char buffer[200000]; int bytes_read=0; @@ -1481,7 +1481,7 @@ read_item(FILE *in) if (r != 1) return NULL; bytes_read+=r; - assert((ib->len+1) < sizeof(buffer)); + assert((ib->len+1)*4 < sizeof(buffer)); s=(ib->len+1)*4-sizeof(*ib); r=fread(ib+1, s, 1, in); if (r != 1)