mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-28 20:51:13 +00:00
rtsp: detect npt time parse errors
This commit is contained in:
parent
81c1172ded
commit
84b1ee4987
1 changed files with 3 additions and 1 deletions
|
@ -86,7 +86,9 @@ parse_npt_time (const gchar * str, GstRTSPTime * time)
|
|||
} else if (strstr (str, ":")) {
|
||||
gint hours, mins;
|
||||
|
||||
sscanf (str, "%2d:%2d:", &hours, &mins);
|
||||
if (sscanf (str, "%2d:%2d:", &hours, &mins) != 2)
|
||||
return GST_RTSP_EINVAL;
|
||||
|
||||
str = strchr (str, ':') + 1;
|
||||
str = strchr (str, ':') + 1;
|
||||
time->type = GST_RTSP_TIME_SECONDS;
|
||||
|
|
Loading…
Reference in a new issue