]> git.alsa-project.org Git - alsa-plugins.git/commit
maemo: Fix a few crashing bugs
authorStian Skjelstad <stian.skjelstad@gmail.com>
Thu, 2 May 2019 21:26:15 +0000 (23:26 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sun, 5 May 2019 07:43:31 +0000 (09:43 +0200)
commitbb69c032a508a5b84a271692fb989ce9938d1b38
treeb65d19cc12f37d6116251533ceed16e0cac99ab5
parenta154ac8d3bd23f17a002d7c92599a759b0035862
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>
maemo/alsa-dsp.c
maemo/dsp-ctl.c
maemo/dsp-protocol.c