[Bug c/44384] builtin_object_size_ treatment of multidimensional arrays is unexpected
meklund at cisco dot com
gcc-bugzilla@gcc.gnu.org
Tue Mar 29 20:42:00 GMT 2011
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44384
--- Comment #2 from Mark Eklund <meklund at cisco dot com> 2011-03-29 20:31:15 UTC ---
I use FORTIFY_SOURCE with a USE_FORTIFY_LEVEL of 2
and was surprised that the below code allowed
writing into fu[4][0]. I expected that at a
level of 1, but not 2.
#include <string.h>
int bar ()
{
char fu[10][10];
strcpy(fu[3], "ten counts");
return 0;
}
More information about the Gcc-bugs
mailing list