[Xfce4-commits] <xfce4-mixer:gber/improvements> Fix a potential NULL pointer dereference

Guido Berhoerster noreply at xfce.org
Fri Sep 21 17:18:03 CEST 2012


Updating branch refs/heads/gber/improvements
         to cec93be0c61ece5e0e83cec2d29d9c4d5a8267f7 (commit)
       from 626dbba8864ab23ef406259cfd750f54cfabf391 (commit)

commit cec93be0c61ece5e0e83cec2d29d9c4d5a8267f7
Author: Guido Berhoerster <guido+xfce at berhoerster.name>
Date:   Fri Sep 21 12:00:36 2012 +0200

    Fix a potential NULL pointer dereference

 NEWS                                  |    1 +
 libxfce4mixer/xfce-mixer-track-type.c |    4 +++-
 2 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/NEWS b/NEWS
index 41ffe45..50eff9e 100644
--- a/NEWS
+++ b/NEWS
@@ -1,6 +1,7 @@
 4.9.0
 =====
 - Handle a negative minimal volume correctly.
+- Fix a potential NULL pointer dereference.
 
 
 4.8.0
diff --git a/libxfce4mixer/xfce-mixer-track-type.c b/libxfce4mixer/xfce-mixer-track-type.c
index f0f1cb8..298443c 100644
--- a/libxfce4mixer/xfce-mixer-track-type.c
+++ b/libxfce4mixer/xfce-mixer-track-type.c
@@ -57,7 +57,9 @@ XfceMixerTrackType
 xfce_mixer_track_type_new (GstMixerTrack *track)
 {
   XfceMixerTrackType type = XFCE_MIXER_TRACK_TYPE_CAPTURE;
-  
+
+  g_return_val_if_fail (GST_IS_MIXER_TRACK (track), G_TYPE_INVALID);
+
   if (G_UNLIKELY (GST_IS_MIXER_OPTIONS (track)))
     type = XFCE_MIXER_TRACK_TYPE_OPTIONS;
   else


More information about the Xfce4-commits mailing list