Commit 201f5031 authored by Guillaume Desmottes's avatar Guillaume Desmottes

parse_npt_range: fix parsing of stop values

parse_range_part() isn't supposed to read any extra char after the range to
parse.

Fix regression in unit test introduced by
edd212d6.
parent 4f96135d
......@@ -97,7 +97,7 @@ parse_range_part (GstDlnaSrc * dlna_src, gchar ** cursor, char *format,
if (sscanf (*cursor, format, tmp) == -1)
return FALSE;
*cursor += strlen (tmp) + 1;
*cursor += strlen (tmp);
if (result_str) {
if (*result_str)
......@@ -152,11 +152,13 @@ dlna_src_parse_npt_range (GstDlnaSrc * dlna_src, const gchar * field_str,
cursor++; /* '=' */
/* Read start value and '-' */
/* Read start */
if (!parse_range_part (dlna_src, &cursor, "%31[^-]-%*s", start_str, start,
FALSE))
goto fail;
cursor++; /* '-' */
/* Read stop value, if any */
if (g_ascii_isdigit (cursor[0])) {
if (!parse_range_part (dlna_src, &cursor, "%31[^/ ]%*s", stop_str, stop,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment