Merged revisions 324678 via svnmerge from
authorKinsey Moore <kmoore@digium.com>
Thu, 23 Jun 2011 18:52:59 +0000 (18:52 +0000)
committerKinsey Moore <kmoore@digium.com>
Thu, 23 Jun 2011 18:52:59 +0000 (18:52 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.8

................
  r324678 | kmoore | 2011-06-23 13:29:17 -0500 (Thu, 23 Jun 2011) | 11 lines

  Merged revisions 324643 via svnmerge from
  https://origsvn.digium.com/svn/asterisk/branches/1.6.2

  ........
    r324643 | kmoore | 2011-06-23 13:21:12 -0500 (Thu, 23 Jun 2011) | 4 lines

    Addresses AST-2011-008, memory corruption and remote crash in SIP driver.

    AST-2011-008
  ........
................

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@324708 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_sip.c

index e4dadc3..0529597 100644 (file)
@@ -25126,7 +25126,8 @@ static int sipsock_read(int *id, int fd, short events, void *ignore)
                return -1;
        }
 
-       req.len = res;
+       /* req.data will have the correct length in case of nulls */
+       req.len = ast_str_strlen(req.data);
        req.socket.fd = sipsock;
        set_socket_transport(&req.socket, SIP_TRANSPORT_UDP);
        req.socket.tcptls_session       = NULL;