Project

General

Profile

Bug #3036

episode duplicate handling can cause crash

Added by Johan Rehnberg almost 7 years ago. Updated almost 7 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

Associated revisions

Revision 9be935d7 (diff)
Added by Jaroslav Kysela almost 7 years ago

DVR: cleanup _dvr_duplicate_event, fix possible NULL dereference, fixes #3036

Revision fc486ea8 (diff)
Added by Jaroslav Kysela almost 7 years ago

DVR: cleanup _dvr_duplicate_event, fix possible NULL dereference, fixes #3036

History

#1

Updated by Jaroslav Kysela almost 7 years ago

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

Also available in: Atom PDF