mirror of
git://sourceware.org/git/libabigail.git
synced 2025-01-10 03:09:29 +00:00
Fix buffer overrun in 'equals' function for arrays
I noticed a buffer overrun in the equals overload for arrays. This patch fixes that. * src/abg-ir.cc (equals): In the overload for arrays, check for the end of the subranges of the two arrays, not just for the first one. Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
parent
c022243aac
commit
9fa58eca69
@ -11414,7 +11414,7 @@ equals(const array_type_def& l, const array_type_def& r, change_kind* k)
|
||||
|
||||
std::vector<array_type_def::subrange_sptr >::const_iterator i,j;
|
||||
for (i = this_subs.begin(), j = other_subs.begin();
|
||||
i != this_subs.end();
|
||||
i != this_subs.end() && j != other_subs.end();
|
||||
++i, ++j)
|
||||
if (**i != **j)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user