public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Re: Buffer overwrite in libstdc++-v3 test 21_strings/c_strings.cc?
@ 2001-09-24 13:18 Benjamin Kosnik
  2001-09-24 14:13 ` Phil Edwards
  0 siblings, 1 reply; 6+ messages in thread
From: Benjamin Kosnik @ 2001-09-24 13:18 UTC (permalink / raw)
  To: gcc, hans-peter.nilsson

The patch to fix this is pre-approved. Thanks for pointing it out.

-benjamin

^ permalink raw reply	[flat|nested] 6+ messages in thread
* Buffer overwrite in libstdc++-v3 test 21_strings/c_strings.cc?
@ 2001-09-24  6:27 Hans-Peter Nilsson
  2001-09-24  6:44 ` Rick Copeland
  0 siblings, 1 reply; 6+ messages in thread
From: Hans-Peter Nilsson @ 2001-09-24  6:27 UTC (permalink / raw)
  To: gcc; +Cc: libstdc++

Is this some C++ gotcha or is there an obvious buffer-overwrite
here?  The CRIS gcc port and the simulator dump says the buffer
is overwritten, but there's no absolute truth in that.

 ...
  const char* ccarray1 = "san francisco roof garden inspectors";
  const char* ccarray2 = "san francisco sunny-day park inspectors";
  char carray[30];
  std::strcpy(carray, ccarray1);
 ...

Will trade patch for clue.

brgds, H-P

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2001-09-25 18:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-09-24 13:18 Buffer overwrite in libstdc++-v3 test 21_strings/c_strings.cc? Benjamin Kosnik
2001-09-24 14:13 ` Phil Edwards
2001-09-24 14:30   ` Benjamin Kosnik
2001-09-25 18:46     ` Phil Edwards
  -- strict thread matches above, loose matches on Subject: below --
2001-09-24  6:27 Hans-Peter Nilsson
2001-09-24  6:44 ` Rick Copeland

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).