]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Avoid access of uninitialized memory. This caused a bunch of crashes for me
authorRussell Bryant <russell@russellbryant.com>
Mon, 19 May 2008 03:44:04 +0000 (03:44 +0000)
committerRussell Bryant <russell@russellbryant.com>
Mon, 19 May 2008 03:44:04 +0000 (03:44 +0000)
while doing load testing of development branch where I'm working on some
performance improvements.

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

channels/chan_iax2.c

index dc65b11f09580969946c849f5fe781a230c4d38c..67bfff42ca34f5b461b864e15e0248433f9b37f0 100644 (file)
@@ -6977,7 +6977,7 @@ static int socket_process(struct iax2_thread *thread)
 
        /* allocate an iax_frame with 4096 bytes of data buffer */
        fr = alloca(sizeof(*fr) + 4096);
-       fr->callno = 0;
+       memset(fr, 0, sizeof(*fr));
        fr->afdatalen = 4096; /* From alloca() above */
 
        /* Copy frequently used parameters to the stack */