This is the mail archive of the ecos-patches@sources.redhat.com mailing list for the eCos 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]

Patch to handle NULL dirp argument to readdir_r


Changelog :
* src/dir.cxx (readdir_r): Handle NULL dirp argument and return EINVAL.

Problem description :
In absence of this fix, further read call in the function will incorrectly try
to read from (fd=0(NULL)).

Choice of return value as EINVAL/ENOTDIR/EBADF . If you find EINVAL is not the
right error code to return, please change that.

peace
sandeep

Attachment: io-fileio-dir-cxx.patch
Description: Binary data


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