]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
staging: speakup: ensure we do not overrun synths array
authorColin Ian King <colin.king@canonical.com>
Mon, 9 May 2016 22:22:14 +0000 (23:22 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 15 Aug 2016 17:14:54 +0000 (19:14 +0200)
commit99a9ffacc1d390e9548b2370beb816c6739b84b2
tree6d3c80b5a05d986e90d9804babe1b15fdfae075b
parentb6ed5a233aea3bd44243bb18d396941c4076e3dc
staging: speakup: ensure we do not overrun synths array

synth_add allows one to add MAXSYNTHS synths to the synths array;
however it always NULLifies the next synth in the array which
means that on the MAXSYNTHS synth we get an out-of-bounds write of
the NULL to the synths array.  Make the synths array MAXSYNTHS + 1
elements in size to allow for the final NULL sentinal to avoid the
out-of-bounds write.

Issue found wit CoverityScan, CID#744671

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Reviewed-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/speakup/synth.c