mackron / miniaudio

Audio playback and capture library written in C, in a single source file.
https://miniaud.io
Other
4.07k stars 361 forks source link

Fix use of uninitialized variables #371

Closed cdsteinkuehler closed 3 years ago

cdsteinkuehler commented 3 years ago

When shutting down, the resultALSA variable can be used when uninitialized in the ma_device_readalsa and ma_device_writealsa routines. This has been verified by both gcc warnings and in application code (we were occasionally seeing segfaults when our callback routine was being passed a crazy large value for the number of frames read when shutting down).

Signed-off-by: Charles Steinkuehler charles@steinkuehler.net

mackron commented 3 years ago

Thanks for this. I'll get this merged soon.

mackron commented 3 years ago

Merged into the dev branch.