This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: Buffer overwrite in libstdc++-v3 test 21_strings/c_strings.c
- To: libstdc++ at gcc dot gnu dot org
- Subject: Re: Buffer overwrite in libstdc++-v3 test 21_strings/c_strings.c
- From: Brad Garcia <garsh at home dot com>
- Date: Wed, 26 Sep 2001 09:17:35 -0400 (EDT)
- cc: hans-peter dot nilsson at axis dot com
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