~vcs-imports/alsa-plugins/trunk

Viewing all changes in revision 345.

  • Committer: Takashi Iwai
  • Author(s): Stian Skjelstad
  • Date: 2019-05-05 07:43:31 UTC
  • Revision ID: git-v1:bb69c032a508a5b84a271692fb989ce9938d1b38
maemo: Fix a few crashing bugs

maemo plugin has two crashes I was able to see in a valgrind log from
another user:

* maximum write size was calculated in words (16bit), but checked against
  byte-size length. This causes memcpy later to overflow the buffer
  (normally by up to 12KB).
* remove a double free (by marking free'd data with NULL)

* mmap returns MMAP_FAILED on error, not NULL

I suspect that this plugin/driver might have other issues aswell, since I
am unable to find any logic for checking DSP buffer status, and no
implementation for odelay reporting.

Signed-off-by: Stian Skjelstad <stian.skjelstad@gmail.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: