]> 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:37:11 +0000 (11:37 -0500)
commit7e8b57db672b851efe4cef4a75499f21e410f5a2
treea05b4e7cc5ed6989a0ccc49348759f8a3ad4dbd1
parent7e17de3d6634bcfcafe3e688807665e404580475
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