Improved tolerance to corrupt HLR files.

This commit is contained in:
gardners 2011-10-01 21:00:05 +09:30
parent 571f042734
commit 95c5124f86

View File

@ -67,7 +67,7 @@ int nextHlr(unsigned char *hlr,int *ofs)
record_length|=hlr[(*ofs)+1]<<16;
record_length|=hlr[(*ofs)+0]<<24;
if (!record_length) return -1;
if (record_length<1) return -1;
(*ofs)+=record_length;
return 0;