From: Reynaldo H. Verdejo Pinochet Date: Wed, 1 Jun 2016 20:18:21 +0000 (-0700) Subject: dvbsrc: avoid out-bound write on PID filter array X-Git-Tag: 1.10.4~650 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=46de31d0f811f9b24b460f99e833104649be1ef4;p=platform%2Fupstream%2Fgst-plugins-bad.git dvbsrc: avoid out-bound write on PID filter array There's no need for an end-of-list marker in the filter PIDs array if full, as the absolute maximum number of elements (MAX_FILTERS) is known. CID #1362441 --- diff --git a/sys/dvb/gstdvbsrc.c b/sys/dvb/gstdvbsrc.c index bb688af..2adfb6e 100644 --- a/sys/dvb/gstdvbsrc.c +++ b/sys/dvb/gstdvbsrc.c @@ -1122,7 +1122,9 @@ gst_dvbsrc_set_pids (GstDvbSrc * dvbsrc, const gchar * pid_string) pids++; } - dvbsrc->pids[pid_count] = G_MAXUINT16; + if (pid_count < MAX_FILTERS) + dvbsrc->pids[pid_count] = G_MAXUINT16; + g_strfreev (tmp); } /* if we are in playing or paused, then set filters now */