<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=US-ASCII">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>[PATCH] Serial code stack corruption</TITLE>
</HEAD>
<BODY>
<BR>

<P><FONT SIZE=2>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.</FONT></P>

<P><FONT SIZE=2>This patch cancels the WaitCommEvent request by calling SetCommMask. This is the only documented method of cancelling the eventmask update.</FONT></P>

<P><FONT FACE="Arial" SIZE=2 COLOR="#000000"></FONT><FONT FACE="Arial" SIZE=2 COLOR="#000000"></FONT><FONT FACE="Arial" SIZE=2 COLOR="#000000"></FONT> 

</BODY>
</HTML>