This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


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

Re: Buffer overwrite in libstdc++-v3 test 21_strings/c_strings.c



On 24-Sep-2001 Hans-Peter Nilsson wrote:

> > how do you fit 37 characters (i.e. strlen(ccarray1) + 1 for the null)
> > into 30 char buffer (size of carray), without overflowing it ?
> 
> That's the question I'm asking.  But presumably some corner in
> that pile of papers called a C++ standards document could
> interpret to say that strcpy should "DWIM" here.

I found nothing in the C++ standard that could be interpretted in
such a way.

Do you mind pointing out the confusing section?

Brad Garcia


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