struct stridxentry *entry = string_find_new_entry (strings, old_idx);
if (entry != NULL)
{
+ if (old_idx >= debug_sections[DEBUG_STR].size)
+ error (1, 0, "Bad string pointer index %zd", old_idx);
+
Strent *strent;
const char *old_str = (char *)debug_sections[DEBUG_STR].data + old_idx;
const char *file = skip_dir_prefix (old_str, base_dir);
struct stridxentry *entry = string_find_new_entry (strings, old_idx);
if (entry != NULL)
{
+ if (old_idx >= debug_sections[DEBUG_STR].size)
+ error (1, 0, "Bad string pointer index %zd", old_idx);
+
const char *str = (char *)debug_sections[DEBUG_STR].data + old_idx;
Strent *strent = strtab_add_len (strings->str_tab,
str, strlen (str) + 1);
{
const char *dir;
size_t idx = do_read_32_relocated (ptr);
+ if (idx >= debug_sections[DEBUG_STR].size)
+ error (1, 0,
+ "%s: Bad string pointer index %zd for comp_dir",
+ dso->filename, idx);
dir = (char *) debug_sections[DEBUG_STR].data + idx;
free (comp_dir);
case. */
char *name;
size_t idx = do_read_32_relocated (ptr);
+ if (idx >= debug_sections[DEBUG_STR].size)
+ error (1, 0,
+ "%s: Bad string pointer index %zd for unit name",
+ dso->filename, idx);
name = (char *) debug_sections[DEBUG_STR].data + idx;
if (*name == '/' && comp_dir == NULL)
{