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
This commit is contained in:
Reynaldo H. Verdejo Pinochet 2016-06-01 13:18:21 -07:00
parent 889a1a9b90
commit 46de31d0f8

View file

@ -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 */