From: robertl Date: Sun, 28 Feb 2010 02:31:28 +0000 (+0000) Subject: Add check to GDB for unreasonable internal values from beta Mapsource from '06. X-Git-Tag: archive/raspbian/1.10.0+ds-2+rpi1~1^2~199^2~45 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a8bc9b235d1d8c5547592dfc3b2cf58e40838c1c;p=gpsbabel.git Add check to GDB for unreasonable internal values from beta Mapsource from '06. --- diff --git a/gdb.c b/gdb.c index 50e8171d2..734b44ada 100644 --- a/gdb.c +++ b/gdb.c @@ -110,8 +110,8 @@ /*******************************************************************************/ -/* static char gdb_release[] = "$Revision: 1.70 $"; */ -static char gdb_release_date[] = "$Date: 2010/01/13 22:52:52 $"; +/* static char gdb_release[] = "$Revision: 1.71 $"; */ +static char gdb_release_date[] = "$Date: 2010/02/28 02:31:28 $"; static gbfile *fin, *fout, *ftmp; static int gdb_ver, gdb_category, gdb_via, gdb_roadbook; @@ -1038,6 +1038,7 @@ read_data(void) fin = fsave; delta = len - gbftell(ftmp); + is_fatal(delta > 1000000, "Internal consistency error. Delta too big"); // Avoid finite loop on bogus beta files from '06. // THe 100000 is totally pulled from my hat.