Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
another round of coverity fixes
  • Loading branch information
perexg committed Jan 8, 2016
1 parent 7f6255a commit fe87cbf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/dvr/dvr_db.c
Expand Up @@ -1679,7 +1679,7 @@ dvr_entry_update
void
dvr_event_replaced(epg_broadcast_t *e, epg_broadcast_t *new_e)
{
dvr_entry_t *de;
dvr_entry_t *de, *de_next;
channel_t *ch = e->channel;
epg_broadcast_t *e2;
char ubuf[UUID_HEX_SIZE];
Expand All @@ -1691,7 +1691,8 @@ dvr_event_replaced(epg_broadcast_t *e, epg_broadcast_t *new_e)
if (ch == NULL || e == new_e) return;

/* Existing entry */
LIST_FOREACH(de, &ch->ch_dvrs, de_channel_link) {
for (de = LIST_FIRST(&ch->ch_dvrs); de; de = de_next) {
de_next = LIST_NEXT(de, de_channel_link);

if (de->de_bcast != e)
continue;
Expand Down
3 changes: 3 additions & 0 deletions src/epggrab/module/psip.c
Expand Up @@ -368,6 +368,9 @@ _psip_eit_callback_channel
length = (ptr[6] & 0x0f) << 16 | ptr[7] << 8 | ptr[8];
stop = start + length;
titlelen = ptr[9];

if (12 + titlelen > len) break;

dlen = ((ptr[10+titlelen] & 0x0f) << 8) | ptr[11+titlelen];
size = titlelen + dlen + 12;
tvhtrace("psip", " %03d: titlelen %d, dlen %d", i, titlelen, dlen);
Expand Down
2 changes: 1 addition & 1 deletion src/wizard.c
Expand Up @@ -334,7 +334,7 @@ static void login_save(idnode_t *in)
}
htsmsg_destroy(conf);

if (s && s[0] != '*' && w->password && w->password[0]) {
if (s[0] != '*' && w->password[0]) {
conf = htsmsg_create_map();
htsmsg_add_bool(conf, "enabled", 1);
htsmsg_add_str(conf, "username", s);
Expand Down

0 comments on commit fe87cbf

Please sign in to comment.