diff options
| author | Tristan Matthews <le.businessman@gmail.com> | 2014-11-02 00:52:14 -0400 |
|---|---|---|
| committer | Tristan Matthews <le.businessman@gmail.com> | 2014-11-02 00:52:48 -0400 |
| commit | 7efec74033f289c86875e2293c91503ebf27767d (patch) | |
| tree | c59b44c1ea2094e42c471e9c2f04dfcafba4dcb0 /RtAudio.cpp | |
| parent | e2f63bd30514c7a8dc3439a681a87681ef0ad6d3 (diff) | |
alsa: avoid uninitialized read
The check if ( subdevice != -1 ) was being done on a potentially
uninitialized variable.
Diffstat (limited to 'RtAudio.cpp')
| -rw-r--r-- | RtAudio.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/RtAudio.cpp b/RtAudio.cpp index af7d205..7bc009d 100644 --- a/RtAudio.cpp +++ b/RtAudio.cpp @@ -6815,6 +6815,7 @@ RtAudio::DeviceInfo RtApiAlsa :: getDeviceInfo( unsigned int device ) // Count cards and devices
card = -1;
+ subdevice = -1;
snd_card_next( &card );
while ( card >= 0 ) {
sprintf( name, "hw:%d", card );
|
