From: Russell Bryant Date: Mon, 19 May 2008 03:44:04 +0000 (+0000) Subject: Avoid access of uninitialized memory. This caused a bunch of crashes for me X-Git-Tag: 1.4.21-rc1~59 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=915e1b570f8bdfc24f3fe6b3ae398ba8e319e36f;p=thirdparty%2Fasterisk.git Avoid access of uninitialized memory. This caused a bunch of crashes for me 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 --- diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c index dc65b11f09..67bfff42ca 100644 --- a/channels/chan_iax2.c +++ b/channels/chan_iax2.c @@ -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 */