[Xfce4-commits] <xfce4-mixer:master> Fix a potential NULL pointer dereference
Guido Berhoerster
noreply at xfce.org
Thu Sep 27 16:46:02 CEST 2012
Updating branch refs/heads/master
to b15809e07aeec55cce1d8184f4ec4905ceb97130 (commit)
from ddda5c6e98f17d407405a7020d7b7804f9ba4b2a (commit)
commit b15809e07aeec55cce1d8184f4ec4905ceb97130
Author: Guido Berhoerster <guido+xfce at berhoerster.name>
Date: Sat Sep 22 09:15:33 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