Project

General

Profile

Bug #3036

episode duplicate handling can cause crash

Added by Johan Rehnberg over 9 years ago. Updated over 9 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
Crashes
Target version:
-
Start date:
2015-08-05
Due date:
% Done:

100%

Estimated time:
Found in version:
v4.0.5-13-g7ca4286
Affected Versions:

Description

de2->de_episode can be null in _dvr_duplicate_event, see attached gdb info.

I fixed this with the following patch:
$ git diff
diff --git a/src/dvr/dvr_db.c b/src/dvr/dvr_db.c
index 37bfeb9..be755d9 100644
--- a/src/dvr/dvr_db.c
+++ b/src/dvr/dvr_db.c
@ -721,7 +721,7 @ static dvr_entry_t* _dvr_duplicate_event(dvr_entry_t* de)

switch (record) {
case DVR_AUTOREC_RECORD_DIFFERENT_EPISODE_NUMBER:
- if (!strcmp(de->de_episode, de2->de_episode))
+ if (de2->de_episode && !strcmp(de->de_episode, de2->de_episode))
return de2;
break;
case DVR_AUTOREC_RECORD_DIFFERENT_SUBTITLE:

Files

tvh_ep_dup.txt (10.6 KB) tvh_ep_dup.txt bt, bt full, print of de and de2 Johan Rehnberg, 2015-08-05 18:06

History

#1

Updated by Jaroslav Kysela over 9 years ago

  • Status changed from New to Fixed
  • % Done changed from 0 to 100

Applied in changeset commit:tvheadend|9be935d7297d205438c754af41f91608352ef64c.

Also available in: Atom PDF