IsBad*Ptr patch

Conrad Scott Conrad.Scott@dsl.pipex.com
Wed Aug 7 10:24:00 GMT 2002


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

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ChangeLog.txt
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020807/f5a09923/attachment.txt>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: isbad.patch.txt
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20020807/f5a09923/attachment-0001.txt>


More information about the Cygwin-patches mailing list