Don't reference past the end of the vector
authorTom Tromey <tom@tromey.com>
Fri, 9 Feb 2018 12:58:46 +0000 (05:58 -0700)
committerTom Tromey <tom@tromey.com>
Fri, 9 Feb 2018 13:46:11 +0000 (06:46 -0700)
commit9c3630e983df43e68006b526a92c2a9a2b64dfd9
tree7f95dd38a082ff70efd716fbc58b3ca40c158bc4
parentc4e126313219ecde255a644a2c74008831edff5a
Don't reference past the end of the vector

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.
gdb/ChangeLog
gdb/source.c