This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: seekdir dereferences null


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Schwarz, Konrad on 12/5/2008 1:36 AM:
>> the bug is in the RTEMS test 
>> suite for not 
>> passing a valid DIR* in the first place, and not in newlib 
>> for crashing on 
>> invalid input
> 
> I fully support this position. I checked the POSIX document 
> yesterday, and it indeed does not say anything about a NULL DIR*,
> but was ultimately too lazy to write out against this.

Actually, POSIX _is_ explicit about null pointer checks:
http://www.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_01.html

"Each of the following statements shall apply unless explicitly stated
otherwise in the detailed descriptions that follow:

   "1. If an argument to a function has an invalid value (such as a value
outside the domain of the function, or a pointer outside the address space
of the program, or a null pointer), the behavior is undefined."

- --
Don't work too hard, make some time for fun as well!

Eric Blake             ebb9@byu.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkk5MYkACgkQ84KuGfSFAYCzwwCguw8zZQb2Rtc6+c/h5C/wN7ie
EQkAn2UPdOoOhyDKQjsfKaoAWFe2HJIp
=nH9X
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]