return cfg;
if (!res) {
res = dvr_config_find_by_uuid(uuid2);
- if (!res->dvr_enabled)
+ if (res != NULL && !res->dvr_enabled)
res = NULL;
}
}
}
// if unmatched "from", save in case matching "to" is coming in next read
if (from) {
- strcpy(from_prev, from);
+ strlcpy(from_prev, from, 255);
fromfd_prev = fromfd;
cookie_prev = cookie;
tvhdebug(LS_DVR_INOTIFY, "i=%d len=%d cookie_prev=%d from_prev=%s fd=%d EOR", i, len, cookie_prev, from_prev, fromfd_prev);
ol = dvb_table_append_crc32(out, ol, sizeof(out));
- if (ol > 0 && (l = dvb_table_remux(mt, out, ol, &ob)) > 0)
+ if (ol > 0 && (l = dvb_table_remux(mt, out, ol, &ob)) > 0) {
sbuf_append(&rtp->table_data, ob, l);
+ free(ob);
+ }
}
static void