Commit d5f8c6dc by Mark Kettenis Committed by Gerald Pfeifer

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
parent bc1b72c7
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). */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment