[PATCH] Serial code stack corruption

Victor Tsou vtsou@good.com
Fri Nov 2 15:55:00 GMT 2001


WaitCommEvent was called in overlapped mode with a pointer to a stack
variable passed in for lpEvtMask. When the asynchronous request completes in
the future, the function might no longer be in scope. In such cases, data on
the stack is erroneously overwritten with the event mask.

This patch cancels the WaitCommEvent request by calling SetCommMask. This is
the only documented method of cancelling the eventmask update.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011102/352bbd72/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ChangeLog
Type: application/octet-stream
Size: 172 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011102/352bbd72/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fhandler_serial.cc-patch
Type: application/octet-stream
Size: 231 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011102/352bbd72/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: select.cc-patch
Type: application/octet-stream
Size: 619 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin-patches/attachments/20011102/352bbd72/attachment-0002.obj>


More information about the Cygwin-patches mailing list