[Live-devel] problem about uninitialized local unsigned variable
kingking kuo
kevinkuokingking at hotmail.com
Wed Aug 29 22:51:54 PDT 2012
Hi,
I use mplayer to visit rtsp://localhost:8854/mp3test, If RTSPServer recv the request , RTSPServer will call the function "handleRequestBytes",In this function we see the local unsigned variable "contentLength", and this local variable is not init , thus the variable's init value is not sure is 0xffffffff,0xcccccccc,or other values.
then the first rtsp request is "rtsp://localhost:8854" and not contain "mp3test", this time the next function call "parseRTSPRequestString" will failed, and the var "contentLength" is not a sure value.
when continue to this setup "unsigned requestSize = (fLastCRLF+4-fRequestBuffer) + contentLength;" in function "handleRequestByte" , if "contentLength" is 0xffffffff then "requestSize" is the request buffer size - 1, if "contentLength" is 0xcccccccc the "requestSize" is a big num,or other posible value.
next setup " memmove(fRequestBuffer, &fRequestBuffer[requestSize], numBytesRemaining);" if requestSize is a big num , this call will crashed.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20120830/15291113/attachment.html>
More information about the live-devel
mailing list