|
|||||||||||
|
Re: safe strcpy()?
From: Steffen Dettmer <steffen(at)dett.de>
Date: Tue Jan 28 2003 - 19:09:55 EST
>
There was a thread on secprog, yep. For instance, I wrote a mail
about "the own text buffer type" in:
> - Use a range checking compiler that emits and tracks this additional
BTW, I know the gcc bounds patch and I used it once, it was a nice thing! Is there something similar available for C++? I've played around with efence and mpatrol, both may help to find overflows and such. Maybe worth a look? > - Implement manual passing of the information by adding a length
Isn't this strncpy and strlcpy? > - ...or, per Crispin's suggestion, use a runtime checker like
Is StackGuard only protecting the stack? Then mpatrol may be more helpful I think, please correct me if I'm wrong. Well, the question was about language... I think, C is "optimized" for speed and is nice for small embedded systems :) "Higher level" languages, such as C++, Java or even Ada and heaps others support much more language features to protect against such issues. Maybe C is not designed for safety... With C++ you can add some comfortable, with Java you should get always run time exceptions. Ada isn't widely used in practice (outside government and medical projects and such) I think. oki, Steffen -- Dieses Schreiben wurde maschinell erstellt, es trägt daher weder Unterschrift noch Siegel.Received on Tue Jan 28 19:13:27 2003 This archive was generated by hypermail 2.1.8 : Wed Aug 23 2006 - 14:02:46 EDT |
||||||||||
|
|||||||||||