diff -Nupr iptv-0.4.0/source.c iptv-0.4.0-new/source.c --- iptv-0.4.0/source.c 2010-03-05 12:20:00.000000000 +1000 +++ iptv-0.4.0-new/source.c 2010-03-08 22:58:01.000000000 +1000 @@ -50,8 +50,11 @@ bool cIptvTransponderParameters::Parse(c { debug("cIptvTransponderParameters::Parse(): s=%s\n", s); + if (s) { + + char *str = (char*)malloc(strlen(s)); + strcpy(str,s); const char *delim = "|"; - char *str = (char *)s; char *saveptr = NULL; char *token = NULL; bool found_s = false; @@ -101,8 +104,10 @@ bool cIptvTransponderParameters::Parse(c str = NULL; } + free(str); if (found_s && found_p && found_f && found_u && found_a) return (true); + } error("Invalid channel parameters: %s\n", s); return (false);