[vlc-commits] auhal: fix insufficient bounds checking introduced in [14250ccc]

Felix Paul Kühne git at videolan.org
Sat Feb 16 21:14:01 CET 2013


vlc | branch: master | Felix Paul Kühne <fkuehne at videolan.org> | Sat Feb 16 21:13:49 2013 +0100| [dd4d8155806afb07d6095924030b8c78e85fca61] | committer: Felix Paul Kühne

auhal: fix insufficient bounds checking introduced in [14250ccc]

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dd4d8155806afb07d6095924030b8c78e85fca61
---

 modules/audio_output/auhal.c |    7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/audio_output/auhal.c b/modules/audio_output/auhal.c
index d56e075..076da3c 100644
--- a/modules/audio_output/auhal.c
+++ b/modules/audio_output/auhal.c
@@ -997,6 +997,13 @@ static void RebuildDeviceList(audio_output_t * p_aout)
         bool b_digital = false;
         UInt32 i_id = deviceIDs[i];
 
+        /* Retrieve the length of the device name */
+        err = AudioObjectGetPropertyDataSize(deviceIDs[i], &deviceNameAddress, 0, NULL, &propertySize);
+        if (err != noErr) {
+            msg_Dbg(p_aout, "failed to get name size for device %i", deviceIDs[i]);
+            continue;
+        }
+
         /* Retrieve the name of the device */
         err = AudioObjectGetPropertyData(deviceIDs[i], &deviceNameAddress, 0, NULL, &propertySize, &device_name_ref);
         if (err != noErr) {



More information about the vlc-commits mailing list