Illegal C++ fails to generate C2039 error, allowing buffer overrun - by David_cs.1

Status : 

  Fixed<br /><br />
		This item has been fixed in the current or upcoming version of this product.<br /><br />
		A more detailed explanation for the resolution of this particular item may have been provided in the comments section.


1
0
Sign in
to vote
ID 612158 Comments
Status Closed Workarounds
Type Bug Repros 0
Opened 10/9/2010 4:17:23 PM
Access Restriction Public

Description

Illegally accessing a member of a nested structure fails to generate a C2039 error.
Interestingly, this allows a buffer overrun without using arrays, pointers, or unions.
Other compilers (g++, Sun's CC) diagnose the error.

This was reported as Bug 406512 for Visual C++ 2008, and a Microsoft comment of 3/17/2009 said "we are going to postpone addressing this problem until the next release of the product".  The problem still exists in this next release.
Sign in to post a comment.
Posted by Microsoft on 12/21/2010 at 10:07 AM
Hi David:
    Thanks for reporting the issue!
    A fix for this issue has been checked into the compiler sources. The fix should show up in the next release of Visual C++.

Xiang Fan
Visual C++ Team
Posted by Microsoft on 10/9/2010 at 4:24 PM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)