bugfix use after free (close
@@ -369,8 +369,10 @@ static char **hl_read_strings( hl_reader *r, int nstrings, int **out_lens ) {
strings[i] = sdata;
lens[i] = sz;
sdata += sz;
- if( sdata >= sbase + size || *sdata )
- EXIT("Invalid string");
+ if( sdata >= sbase + size || *sdata ) {
+ ERROR("Invalid string");
+ return NULL;
+ }
sdata++;
}
*out_lens = lens;
