Bug #2012
invalid Url from own urlparse()
100%
Description
I compiled 3.9.467 with several option.
When I config the IPTV,
a. compiled with ENABLE_URIPARSER
works fine.
b. compiled without ENABLE_URIPARSER
urlparse() in iptv.c invoke the error "invalid Url"
Subtasks
History
Updated by MinGyoon Woo over 10 years ago
I found problem and fix that.
/src/url.c line 101
#define URL_RE "^(\\w+)://(("UC"+)(:("PC"+))?)?("HC"+)(:([0-9]+))?(/.*)?"
)?("HC"+)(:([0-9]+))?(/.*)?"
is wrong, should be
#define URL_RE "([A-Za-z]+)://(("UC"+)(:("PC"+))?
for Non posix standard.
Updated by Adam Sutton over 10 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset tvheadend|commit:85e01365b72962bd304214ab3271f07f04e74831.
Updated by MinGyoon Woo over 10 years ago
Adam, I found mistyping from your correction in git master.
url.c line 101#define URL_RE "^([A-Za-z)://(("UC"+)(:("PC"+))?
)?("HC"+)(:([0-9]+))?(/.*)?"
#define URL_RE "([A-Za-z]+)://(("UC"+)(:("PC"+))?
is wrong. You missed ']' and wrong '^'. I believe '^''s meaning is exclude.
It should be)?("HC"+)(:([0-9]+))?(/.*)?"