This is the mail archive of the 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

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:

"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   
Version: GnuPG v1.4.9 (Cygwin)
Comment: Public key at
Comment: Using GnuPG with Mozilla -


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