souphttpsrc: fix svace issue 53/105553/2 accepted/tizen/3.0/common/20161219.113802 accepted/tizen/3.0/ivi/20161219.090717 accepted/tizen/3.0/mobile/20161219.091612 accepted/tizen/3.0/tv/20161219.091013 accepted/tizen/3.0/wearable/20161219.091504 submit/tizen_3.0/20161219.052705
authorEunhae Choi <eunhae1.choi@samsung.com>
Mon, 19 Dec 2016 04:28:12 +0000 (13:28 +0900)
committerEunhae Choi <eunhae1.choi@samsung.com>
Mon, 19 Dec 2016 04:29:53 +0000 (13:29 +0900)
Change-Id: Id303ad49d9b536a4b7a348a3969208bac9e33601
Signed-off-by: Eunhae Choi <eunhae1.choi@samsung.com>
ext/soup/gstsouphttpsrc.c
gst/rtsp/gstrtspsrc.c

index df8daf1..586c9f0 100644 (file)
@@ -842,7 +842,7 @@ gst_soup_http_src_add_range_header (GstSoupHTTPSrc * src, guint64 offset,
 We have observed that , for few specific networks ( VODAFONE ) , without theabove headers ,
 Youtube is sending non-seekable contents to the Client.
 */
-  if (offset >=0 || stop_offset != -1) {
+  if (stop_offset != -1) {
 #else
   if (offset || stop_offset != -1) {
 #endif
@@ -894,13 +894,14 @@ _append_extra_header (GQuark field_id, const GValue * value, gpointer user_data)
   if (!g_ascii_strcasecmp(field_name, "Cookie")) {
     SoupURI *uri = NULL;
     SoupCookie *cookie_parsed = NULL;
+    gchar *saveptr = NULL;
 
     if (strlen(field_content) > 0) {
       gchar *tmp_field = NULL;
 
       uri = soup_uri_new (src->location);
 
-      tmp_field = strtok (field_content, ";");
+      tmp_field = strtok_r (field_content, ";", &saveptr);
 
       while (tmp_field != NULL) {
         GST_DEBUG_OBJECT (src, "field_content = %s", tmp_field);
index c8c909c..a8e6209 100644 (file)
@@ -5376,11 +5376,11 @@ handle_request_failed:
     gst_rtsp_message_unset (&message);
     if (res != GST_RTSP_EINTR) {
 #ifdef TIZEN_FEATURE_RTSP_MODIFICATION
-    gst_rtspsrc_post_error_message ( src,
-                               GST_RTSPSRC_ERROR_SERVICE_UNAVAILABLE,"Could not handle server message.");
+      gst_rtspsrc_post_error_message ( src,
+            GST_RTSPSRC_ERROR_SERVICE_UNAVAILABLE,"Could not handle server message.");
 #else
-    GST_ELEMENT_ERROR (src, RESOURCE, WRITE, (NULL),
-          ("Could not handle server message. (%s)", str));
+      GST_ELEMENT_ERROR (src, RESOURCE, WRITE, (NULL),
+            ("Could not handle server message. (%s)", str));
 #endif
       g_free (str);
       ret = GST_FLOW_ERROR;