staging: speakup: kobjects.c: Use correct values when changing voice.
authorChristopher Brannon <chris@the-brannons.com>
Wed, 11 Sep 2013 17:05:27 +0000 (10:05 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 17 Sep 2013 14:47:46 +0000 (07:47 -0700)
commitfaf487b62059cd837c393dd42b30996da49fc157
treeb5023dc0891c54fa9000ce01450d8d5a9e55abcd
parentb71600bb4bc8591c9bc4234cc12b51d521444b1c
staging: speakup: kobjects.c: Use correct values when changing voice.

When a new voice is selected, we set volume and pitch appropriate for
the voice.  We need to use the numeric index corresponding to the
voice when indexing into the volume and pitch tables, rather than
the raw user input that was used to select the voice.
Note that using the raw input can also lead to an invalid memory read
in the case of invalid or malicious user input.

Signed-off-by: Christopher Brannon <chris@the-brannons.com>
Acked-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/speakup/kobjects.c