Menu

#94 SLPXcastRecvMessage fails to account for SOCKET_ERROR

open
nobody
5
2012-11-14
2007-06-22
Alan
No

Both of the recv() calls in SLPXcastRecvMessage assume return must be >= 0.

When SOCKET_ERROR (-1) occurs, the "(*buf)->curpos + bytesread" math sets up an SLPBuffer where future "SLPBuffer.end - SLPBuffer.start" logic results in a negative number.

(Observed this during libslp!NetworkMcastRqstRply in 2.0.0 04JAN2007 on Vista x86. Because of bug 1741254, the negative number calculated by SLPBufferDup didn't fail SLPBufferAlloc, and was left to die on a memcpy for 0xFFFFFFFF bytes.)

Discussion


Log in to post a comment.