summaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-pcf8523.c
diff options
context:
space:
mode:
authorTilman Schmidt <tilman@imap.cc>2014-10-11 13:46:30 +0200
committerDavid S. Miller <davem@davemloft.net>2014-10-14 15:05:34 -0400
commit5362247a42e18ef74e698bb23575c272f8e35375 (patch)
tree554176a9ed7964f711456c7dd41427b2bf8dc2dd /drivers/rtc/rtc-pcf8523.c
parent9ea8aa8d5087529210553114b7bc4bf4374ace8f (diff)
downloadblackbird-op-linux-5362247a42e18ef74e698bb23575c272f8e35375.tar.gz
blackbird-op-linux-5362247a42e18ef74e698bb23575c272f8e35375.zip
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 <tilman@imap.cc> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/rtc/rtc-pcf8523.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud