This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c/44384] builtin_object_size_ treatment of multidimensional arrays is unexpected


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;
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]