[Live-devel] SEGV handling GET_PARAMETER response.
Ross Finlayson
finlayson at live555.com
Fri Feb 8 09:47:57 PST 2013
> In this context we are in RTSPClient.cpp around 1555 :
>
> // If we saw a "Content-Length:" header, then make sure that we have the amount of data that it specified:
> unsigned bodyOffset = nextLineStart - headerDataCopy;
> bodyStart = &fResponseBuffer[bodyOffset];
> numBodyBytes = fResponseBytesAlreadySeen - bodyOffset;
> if (contentLength > numBodyBytes) {
>
> Gdb says that nextLineStart is NULL, bodyOffset is a big number, and finally bodyStart point a non allocated memory (that raise a SEGV).
>
> Do you think if is possible to add check nextLineStart before using it :
Instead, please replace the line
unsigned bodyOffset = nextLineStart - headerDataCopy;
with
unsigned bodyOffset = nextLineStart == NULL ? fResponseBytesAlreadySeen : nextLineStart - headerDataCopy;
If you still have a problem after this change, please let me know. (Otherwise I'll make that change in the next release of the software.)
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20130209/5df49699/attachment.html>
More information about the live-devel
mailing list