mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-07 11:30:18 +00:00
Improved tolerance to corrupt HLR files.
This commit is contained in:
parent
571f042734
commit
95c5124f86
@ -67,7 +67,7 @@ int nextHlr(unsigned char *hlr,int *ofs)
|
|||||||
record_length|=hlr[(*ofs)+1]<<16;
|
record_length|=hlr[(*ofs)+1]<<16;
|
||||||
record_length|=hlr[(*ofs)+0]<<24;
|
record_length|=hlr[(*ofs)+0]<<24;
|
||||||
|
|
||||||
if (!record_length) return -1;
|
if (record_length<1) return -1;
|
||||||
|
|
||||||
(*ofs)+=record_length;
|
(*ofs)+=record_length;
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user