Agent-Logs-Url: https://github.com/tvheadend/tvheadend/sessions/
bc91d39b-dbd2-4eac-8b9d-
3caf92a47726
Co-authored-by: Flole998 <9951871+Flole998@users.noreply.github.com>
channel_t *ch;
uint32_t maj, min = 0;
uint64_t cno;
- char *s;
+ char *buf, *s;
if (no == NULL)
return NULL;
- if ((s = strchr(no, '.')) != NULL) {
+ buf = tvh_strdupa(no);
+ if ((s = strchr(buf, '.')) != NULL) {
*s = '\0';
min = atoi(s + 1);
}
- maj = atoi(no);
+ maj = atoi(buf);
cno = (uint64_t)maj * CHANNEL_SPLIT + (uint64_t)min;
CHANNEL_FOREACH(ch)
if(channel_get_number(ch) == cno)
static int
http_client_parse_arg( http_arg_list_t *list, const char *p )
{
+ char *buf = tvh_strdupa(p);
char *d, *t;
- d = strchr(p, ':');
+ d = strchr(buf, ':');
if (d) {
*d++ = '\0';
while (*d && *d <= ' ')
t = d + strlen(d);
while (--t != d && *t <= ' ')
*t = '\0';
- http_arg_set(list, p, d);
+ http_arg_set(list, buf, d);
return 0;
}
return -EINVAL;
int fd, ret, close_ret;
struct stat st;
const char *range;
- char *basename;
+ const char *basename;
char *str, *str0;
char range_buf[255];
char *disposition = NULL;