[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: If you could design a $300 homecomputer today, what would you choose?
In article <6172ee17.0108060623.59586e4f@posting.google.com>,
Graham <graham@aledrinker.co.uk> wrote:
>> And there are not dozens of known security holes in most Unix/Linux
>> distributions? Every scanf(),gets(), sprintf(),strcpy in the OS is a
>> potential security hazard.
>
> Hence you should use the more secure alternatives with length
> parameters to prevent buffer overflows, such as strncpy.
And in particular, scanf(), gets(), sprintf(), strcpy() are not OS
functions but C runtime library functions, and the security holes
within these functions are present in *all* C runtime libraries,
including those running under MS-Windoze....
scanf() in particular is useless for anything but quick'n'dirty
throw-away test programs, and should never be used in a real
application.
--
----------------------------------------------------------------
Paul Schlyter, Swedish Amateur Astronomer's Society (SAAF)
Grev Turegatan 40, S-114 38 Stockholm, SWEDEN
e-mail: pausch at saaf dot se or paul.schlyter at ausys dot se
WWW: http://hotel04.ausys.se/pausch http://welcome.to/pausch