| Summary: | Jump to NULL function pointer on ALSA_OpenDevice when not SDL_AUDIO_DRIVER_ALSA_DYNAMIC | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Bruno <bonbons67> |
| Component: | audio | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | major | ||
| Priority: | P2 | ||
| Version: | HG 2.0 | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Attachments: | Fix segfault in ALSA_OpenDevice() | ||
This patch is in, thanks! http://hg.libsdl.org/SDL/rev/192f2d605339 |
Created attachment 550 [details] Fix segfault in ALSA_OpenDevice() When alsa is linked to libsdl instead of being loaded on demand at runtime the alsa macro snd_pcm_hw_params_alloca(ptr); misbehaves. That macro calls snd_pcm_hw_params_sizeof() in order to determine the amount of memory to allocate but due to mis-placed define that function is replaced with ALSA_snd_pcm_hw_params_sizeof by preprocessor (and in case of link to alsa that function pointer is initialized to itself). Attached patch fixes the issue.