This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin 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]

IsBad*Ptr patch


I've attached a patch that starts from changing the signature of
__check_null_invalid_struct and __check_null_invalid_struct_errno
to take a non-const void *.  Previously they took a const argument
and as a result, were being called in a couple of places on const
system call arguments that should have had
__check_invalid_read_ptr_errno called on them.

So, I changed their signatures and patched a couple of problems
that showed up as a result.

While I was at it, I fiddled with those system call interfaces in
"net.cc" that delegate to fhandler_socket methods.  I've made the
error checking consistent, so the right errno is set for
non-socket file descriptors and they all emit their trace messages
even on error, and also corrected a couple of minor issues where
optional arguments were being unconditionally checked.

The recvmsg and sendmsg interfaces don't fully check their
arguments yet (i.e. the iovec part) but this patch is the first of
a set for readv/writev changes, and the final version will include
the relevant checks.

Enjoy!

// Conrad

Attachment: ChangeLog.txt
Description: Text document

Attachment: isbad.patch.txt
Description: Text document


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