]> git.ipfire.org Git - thirdparty/asterisk.git/commit
AST-2017-004: chan_skinny: Add EOF check in skinny_session
authorGeorge Joseph <gjoseph@digium.com>
Thu, 13 Apr 2017 16:14:48 +0000 (10:14 -0600)
committerMatthew Fredrickson <creslin@digium.com>
Fri, 19 May 2017 16:04:19 +0000 (11:04 -0500)
commit1cc18d40252834a967b74d87323bca4d59d6c693
treeb36edba0f5cc468b52a8fec42a08f48159271988
parent722ec0671e7a9d452872c766fc8a9017f37c666e
AST-2017-004: chan_skinny:  Add EOF check in skinny_session

The while(1) loop in skinny_session wasn't checking for EOF so
a packet that was longer than a header but still truncated
would spin the while loop infinitely.  Not only does this
permanently tie up a thread and drive a core to 100% utilization,
the call of ast_log() in such a tight loop eats all available
process memory.

Added poll with timeout to top of read loop

ASTERISK-26940 #close
Reported-by: Sandro Gauci
Change-Id: I2ce65f3c5cb24b4943a9f75b64d545a1e2cd2898
channels/chan_skinny.c