An earlier change made find_source_lines read:
end = &data[size];
However, since 'size' is the size of the vector, this seems fishy.
More obviously ok is to compute the end of the data directly:
end = data.data () + size;
2018-02-09 Tom Tromey <tom@tromey.com>
* source.c (find_source_lines): Don't reference past the end of
the vector.
+2018-02-09 Tom Tromey <tom@tromey.com>
+
+ * source.c (find_source_lines): Don't reference past the end of
+ the vector.
+
2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
* remote.c (remote_btrace_maybe_reopen): Change error message.
size = myread (desc, data.data (), size);
if (size < 0)
perror_with_name (symtab_to_filename_for_display (s));
- end = &data[size];
+ end = data.data () + size;
p = &data[0];
line_charpos[0] = 0;
nlines = 1;