asterisk/channels
Matthew Jordan 5111744214 Don't attempt to create a voice frame on a read error
Prior to this patch, a read error in snd_pcm_readi would still be treated as a
nominal result when constructing a voice frame from the expected data. Since
the value returned is negative, as opposed to the number of samples read,
this could result in a crash. With this patch, we now return a null frame
when a read error is detected.

Note that the patch on ASTERISK-21329 was modified slightly for this commit,
in that we bail immediately on detecting the read error, rather than bypassing
the construction of the voice frame.

(closes issue ASTERISK-21329)
Reported by: Keiichiro Kawasaki
patches:
  chan_alsa.diff uploaded by kawasaki (License 6489)
........

Merged revisions 385633 from http://svn.asterisk.org/svn/asterisk/branches/1.8
........

Merged revisions 385634 from http://svn.asterisk.org/svn/asterisk/branches/11


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@385635 65c4cc65-6c06-0410-ace0-fbb531ad65f3
2013-04-14 02:35:04 +00:00
..
h323 Asterisk media architecture conversion - no more format bitfields 2011-02-03 16:22:10 +00:00
iax2 chan_iax2: Fix compile error if MALLOC_DEBUG enabled. 2013-02-01 19:35:26 +00:00
misdn chan_misdn: Fix sending RELEASE_COMPLETE in response to SETUP. 2012-11-30 21:38:01 +00:00
sip AST-2013-003: Prevent username disclosure in SIP channel driver 2013-03-27 15:27:31 +00:00
Makefile Move the ancillary iax2 source files into a separate sub-directory. 2013-01-29 22:58:33 +00:00
chan_agent.c chan_agent: Prevent multiple channels from logging in as the same agent. 2013-01-29 18:02:07 +00:00
chan_alsa.c Don't attempt to create a voice frame on a read error 2013-04-14 02:35:04 +00:00
chan_bridge.c confbridge: Minor fixes playing user counts to the conference. 2013-01-22 00:36:52 +00:00
chan_console.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_dahdi.c chan_dahdi: Change inband_on_proceeding option default to no/disabled. 2013-04-03 20:27:11 +00:00
chan_gtalk.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_h323.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_iax2.c IAX2 defer_full_frames fail to get sent 2013-04-12 08:52:44 +00:00
chan_jingle.c Set the sin_family on the bind address socket during initialization 2013-02-24 23:01:17 +00:00
chan_local.c Prevent exhaustion of system resources through exploitation of event cache 2013-01-02 18:11:59 +00:00
chan_mgcp.c Convert MWI state message type to the new stasis naming convention 2013-03-27 22:42:06 +00:00
chan_misdn.c chan_misdn: Fix compile error. 2013-01-16 17:49:52 +00:00
chan_motif.c Add The Status Of A Module To The Output Of "CLI> module show" 2013-02-19 17:17:10 +00:00
chan_multicast_rtp.c Opaquification for ast_format structs in struct ast_channel 2012-02-24 00:32:20 +00:00
chan_nbs.c Opaquification for ast_format structs in struct ast_channel 2012-02-24 00:32:20 +00:00
chan_oss.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_phone.c Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
chan_phone.h rename DialTone.h to chan_phone.h because chan_phone.c is the only file using it 2008-05-28 20:00:21 +00:00
chan_sip.c Fix One-Way Audio With auto_* NAT Settings When SIP Calls Initiated By PBX 2013-04-12 15:06:09 +00:00
chan_skinny.c Convert MWI state message type to the new stasis naming convention 2013-03-27 22:42:06 +00:00
chan_unistim.c Convert MWI state message type to the new stasis naming convention 2013-03-27 22:42:06 +00:00
chan_vpb.cc Doxygen Updates - Title update 2012-10-14 21:47:40 +00:00
console_board.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
console_gui.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
console_video.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
console_video.h implement the 'freeze' function for incoming frames; 2008-06-30 15:45:15 +00:00
misdn_config.c Add named callgroups/pickupgroups 2012-08-07 12:46:36 +00:00
sig_analog.c Multiple revisions 375993-375994 2012-11-07 19:15:26 +00:00
sig_analog.h Convert sig_analog to use a global callback table. 2012-08-08 20:32:53 +00:00
sig_pri.c chan_dahdi: Add inband_on_proceeding compatibility option. 2013-04-03 20:20:09 +00:00
sig_pri.h chan_dahdi: Add inband_on_proceeding compatibility option. 2013-04-03 20:20:09 +00:00
sig_ss7.c chan_dahdi/SS7: Made reject incoming call for an in-alarm or blocked channel. 2012-11-08 21:12:35 +00:00
sig_ss7.h Convert sig_ss7 to use a global callback table. 2012-08-08 00:15:54 +00:00
vcodecs.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00
vgrabbers.c Multiple revisions 369001-369002 2012-06-15 16:20:16 +00:00