Fix #2555 - Invalid read in r_bin_dwarf_parse_lnp_header

This commit is contained in:
pancake 2015-05-13 00:40:33 +02:00
parent 9f5fe47783
commit ba4d3e8733

View File

@ -258,7 +258,13 @@ static const ut8 *r_bin_dwarf_parse_lnp_header (
free (str);
break;
}
if (f) fprintf (f, "INCLUDEDIR (%s)\n", buf);
if (*str != '/' && *str != '.') {
// no more paths in here
break;
}
if (f) {
fprintf (f, "INCLUDEDIR (%s)\n", str);
}
add_sdb_include_dir (s, str, i);
free (str);
i++;