Re: fopen_s
- From: "Eugene Gershnik" <gershnik@xxxxxxxxxxx>
- Date: Tue, 27 Jun 2006 22:15:30 -0700
mike7411@xxxxxxxxx wrote:
How is fopen_s safer than fopen?
Googling for fopen_s brings
http://msdn2.microsoft.com/en-us/library/z5hh6ee9.aspx
which directs us to go to
http://msdn2.microsoft.com/en-us/library/8ef0s5kh.aspx
to find about "Security Enhancements in the CRT ". This page has the
following
<quote>
Enhanced error reporting. The secure functions return error codes with more
error information than was available with the preexisting functions. The
secure functions and many of the preexisting functions now set errno and
often return an errno code type as well, to provide better error reporting.
</quote>
How returning errno helps with error reporting and what this has to do with
security as such is beyond my imagination. Presumably somebody at Microsoft
has trouble understanding and using an API that doesn't uniformly return
error codes in COM manner.
--
Eugene
http://www.gershnik.com
.
- Follow-Ups:
- Re: fopen_s
- From: David Webber
- Re: fopen_s
- References:
- fopen_s
- From: mike7411
- fopen_s
- Prev by Date: Re: sizeof peculiarity ?
- Next by Date: RE: RC Resource DLL Problem
- Previous by thread: fopen_s
- Next by thread: Re: fopen_s
- Index(es):
Loading