From 9409e074400dc55603119f5bc30de14e1dd243d9 Mon Sep 17 00:00:00 2001 From: Jan Schmidt Date: Mon, 21 Nov 2005 16:46:07 +0000 Subject: [PATCH] gst/elements/gstfdsrc.c: Don't ignore sscanf results Original commit message from CVS: * gst/elements/gstfdsrc.c: (gst_fdsrc_uri_set_uri): Don't ignore sscanf results --- ChangeLog | 5 +++++ gst/elements/gstfdsrc.c | 5 ++++- plugins/elements/gstfdsrc.c | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 86eaf817e2..2f6031cd58 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-21 Jan Schmidt + + * gst/elements/gstfdsrc.c: (gst_fdsrc_uri_set_uri): + Don't ignore sscanf results + 2005-11-21 Andy Wingo * gst/gstpad.h (GST_IS_PAD_FAST): Removed. diff --git a/gst/elements/gstfdsrc.c b/gst/elements/gstfdsrc.c index 2c7795ee32..84a1688f51 100644 --- a/gst/elements/gstfdsrc.c +++ b/gst/elements/gstfdsrc.c @@ -396,7 +396,10 @@ gst_fdsrc_uri_set_uri (GstURIHandler * handler, const gchar * uri) return FALSE; } g_free (protocol); - sscanf (uri, "fd://%d", &fd); + + if (sscanf (uri, "fd://%d", &fd) != 1) + return FALSE; + src->fd = fd; g_free (src->uri); src->uri = g_strdup (uri); diff --git a/plugins/elements/gstfdsrc.c b/plugins/elements/gstfdsrc.c index 2c7795ee32..84a1688f51 100644 --- a/plugins/elements/gstfdsrc.c +++ b/plugins/elements/gstfdsrc.c @@ -396,7 +396,10 @@ gst_fdsrc_uri_set_uri (GstURIHandler * handler, const gchar * uri) return FALSE; } g_free (protocol); - sscanf (uri, "fd://%d", &fd); + + if (sscanf (uri, "fd://%d", &fd) != 1) + return FALSE; + src->fd = fd; g_free (src->uri); src->uri = g_strdup (uri);