[Live-devel] SEGV handling GET_PARAMETER response.

PROMONET Michel michel.promonet at thalesgroup.com
Mon Feb 11 05:04:43 PST 2013


                Hi Ross,

Even if I have not identify what's wrong with the GET_PARAMETER response sent by the camera, I confirmed that your modification fix the problem.

Thanks,

                Michel.

[@@THALES GROUP RESTRICTED@@]

De : live-devel-bounces at ns.live555.com [mailto:live-devel-bounces at ns.live555.com] De la part de Ross Finlayson
Envoyé : vendredi 8 février 2013 18:48
À : LIVE555 Streaming Media - development & use
Objet : Re: [Live-devel] SEGV handling GET_PARAMETER response.

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/20130211/6887fc45/attachment-0001.html>


More information about the live-devel mailing list