+2021-05-15 Alan Modra <amodra@gmail.com>
+
+ * dwarf.c (display_debug_lines_decoded): Don't use strnlen when
+ we have already checked for NUL termination.
+
2021-05-15 Alan Modra <amodra@gmail.com>
* dwarf.c (read_debug_line_header): Delete initial_length_size.
while (*ptr_directory_table != 0)
{
directory_table[i] = ptr_directory_table;
- ptr_directory_table += strnlen ((char *) ptr_directory_table,
- ptr_directory_table - end) + 1;
+ ptr_directory_table
+ += strlen ((char *) ptr_directory_table) + 1;
i++;
}
}
while (*ptr_file_name_table != 0)
{
file_table[i].name = ptr_file_name_table;
- ptr_file_name_table += strnlen ((char *) ptr_file_name_table,
- end - ptr_file_name_table) + 1;
+ ptr_file_name_table
+ += strlen ((char *) ptr_file_name_table) + 1;
/* We are not interested in directory, time or size. */
READ_ULEB (file_table[i].directory_index,