projects
/
rtaudio-cdist.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2f63bd
)
alsa: avoid uninitialized read
author
Tristan Matthews
<le.businessman@gmail.com>
Sun, 2 Nov 2014 04:52:14 +0000
(
00:52
-0400)
committer
Tristan Matthews
<le.businessman@gmail.com>
Sun, 2 Nov 2014 04:52:48 +0000
(
00:52
-0400)
The check if ( subdevice != -1 ) was being done on a potentially
uninitialized variable.
RtAudio.cpp
patch
|
blob
|
history
diff --git
a/RtAudio.cpp
b/RtAudio.cpp
index af7d205a1977491c39e76b85affb3fc8dc332807..7bc009d1df58a4fe28a787416025d8c23e426c6d 100644
(file)
--- a/
RtAudio.cpp
+++ b/
RtAudio.cpp
@@
-6815,6
+6815,7
@@
RtAudio::DeviceInfo RtApiAlsa :: getDeviceInfo( unsigned int device )
\r
// Count cards and devices
\r
card = -1;
\r
+ subdevice = -1;
\r
snd_card_next( &card );
\r
while ( card >= 0 ) {
\r
sprintf( name, "hw:%d", card );
\r