From: Tilman Schmidt Date: Sat, 11 Oct 2014 11:46:30 +0000 (+0200) Subject: isdn/capi: prevent index overrun from command_2_index() X-Git-Tag: fixes-against-v3.18-rc2~61^2~49^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5362247a42e18ef74e698bb23575c272f8e35375;p=pandora-kernel.git isdn/capi: prevent index overrun from command_2_index() The result of the function command_2_index() is used to index two arrays mnames[] and cpars[] with max. index 0x4e but in its current form that function can produce results up to 3*(0x9+0x9)+0x7f = 0xb5. Fix by clamping all result values potentially overrunning the arrays to zero which is already handled as an invalid value. Re-spotted with Coverity. Signed-off-by: Tilman Schmidt Signed-off-by: David S. Miller --- Reading git-diff-tree failed