mirror of
https://gcc.gnu.org/git/gcc.git
synced 2025-01-17 09:13:49 +08:00
decl.c (reshape_init_class): Avoid dereferencing a past-the-end pointer.
* decl.c (reshape_init_class): Avoid dereferencing a past-the-end pointer. From-SVN: r191106
This commit is contained in:
parent
bc1b72c78f
commit
d5f8c6dc8c
@ -1,3 +1,8 @@
|
||||
2012-09-09 Mark Kettenis <kettenis@openbsd.org>
|
||||
|
||||
* decl.c (reshape_init_class): Avoid dereferencing a
|
||||
past-the-end pointer.
|
||||
|
||||
2012-09-07 Paolo Carlini <paolo.carlini@oracle.com>
|
||||
|
||||
* pt.c (num_template_headers_for_class): Rework per the code
|
||||
|
@ -5131,7 +5131,7 @@ reshape_init_class (tree type, reshape_iter *d, bool first_initializer_p,
|
||||
if (field_init == error_mark_node)
|
||||
return error_mark_node;
|
||||
|
||||
if (d->cur->index && d->cur == old_cur)
|
||||
if (d->cur == old_cur && d->cur->index)
|
||||
{
|
||||
/* This can happen with an invalid initializer for a flexible
|
||||
array member (c++/54441). */
|
||||
|
Loading…
Reference in New Issue
Block a user