Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: safe strcpy()?

From: Brandon Erhart <berhart(at)ErhartGroup.COM>
Date: Tue Jan 28 2003 - 12:21:19 EST

At 03:14 AM 1/28/2003, you wrote:
>On Tue, 28 Jan 2003, Ed Carp wrote:
That's the reason I love it :) Although I learned QBasic first while I was young and impressionable, I was still able to migrate to C without a manifold of problems. It's very powerful.
> > I'm not interested in manual manipulation of code, or suggestions on

That's the source of a lot of problems, though. Bugs that pop up just NOW AND THEN when the stack gets fubar'd by some seemingly innocent code (which has happened to me many a time -- hard to find it).

Semi-Interesting-for-those-who-don't-know: A fellow in #C on EFnet IRC once suggested I put a char array w/ a large length as the first variable in the block of code I thought it was happening at. I did it, and the bug "went away" (the variable was being written into instead of smooshing the stack due to lack of size since we had increased it). Not a fix, but a way of debugging, just thought I'd share that.

>For dynamically allocated memory, you might want to use

Thank you Michal. I will try it :) Indirectly helping everyone !!

  • Brandon Erhart
Received on Tue Jan 28 13:00:14 2003

This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:45 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library