summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2004-01-04 15:20:42 +0100
committerKlaus Schmidinger <vdr@tvdr.de>2004-01-04 15:20:42 +0100
commita80709f1ddfe77667cf4d149343d3497593b1ca3 (patch)
tree41f6aaca97f57311eb0b9b64098d7bd488138c12
parentf192a51002d9a3b0ecdeea47e02b01163764bdad (diff)
downloadvdr-a80709f1ddfe77667cf4d149343d3497593b1ca3.tar.gz
vdr-a80709f1ddfe77667cf4d149343d3497593b1ca3.tar.bz2
Limited the line length in the EPG bugfix report1.3.0
-rw-r--r--HISTORY3
-rw-r--r--epg.c16
2 files changed, 13 insertions, 6 deletions
diff --git a/HISTORY b/HISTORY
index 9607741e..053caf66 100644
--- a/HISTORY
+++ b/HISTORY
@@ -2534,3 +2534,6 @@ Video Disk Recorder Revision History
provided by the installed CAM. Only the special values 1-16 are used to assign
a channel to a particular device.
- Increased the maximum number of possible OSD colors to 256.
+- Limited the line length in the EPG bugfix report, which appears to fix a buffer
+ overflow that caused a crash when cleaning up the EPG data (at 05:00 in the
+ morning).
diff --git a/epg.c b/epg.c
index 6469708e..69130145 100644
--- a/epg.c
+++ b/epg.c
@@ -7,7 +7,7 @@
* Original version (as used in VDR before 1.3.0) written by
* Robert Schneider <Robert.Schneider@web.de> and Rolf Hakenes <hakenes@hippomi.de>.
*
- * $Id: epg.c 1.2 2003/12/25 12:47:26 kls Exp $
+ * $Id: epg.c 1.3 2004/01/04 15:20:42 kls Exp $
*/
#include "epg.h"
@@ -233,6 +233,10 @@ void ReportEpgBugFixStats(bool Reset)
}
q += snprintf(q, sizeof(buffer) - (q - buffer), "%s%s", delim, channel->Name());
delim = ", ";
+ if (q - buffer > 80) {
+ q += snprintf(q, sizeof(buffer) - (q - buffer), "%s...", delim);
+ break;
+ }
}
}
if (*buffer)
@@ -261,7 +265,7 @@ void cEvent::FixEpgBugs(void)
// EPG data. Let's fix their bugs as good as we can:
if (title) {
- // VOX puts too much information into the ShortText and leaves the
+ // Some channels put too much information into the ShortText and leave the
// Description empty:
//
// Title
@@ -287,7 +291,7 @@ void cEvent::FixEpgBugs(void)
}
}
- // VOX and VIVA put the ShortText in quotes and use either the ShortText
+ // Some channels put the ShortText in quotes and use either the ShortText
// or the Description field, depending on how long the string is:
//
// Title
@@ -311,7 +315,7 @@ void cEvent::FixEpgBugs(void)
}
}
- // VOX and VIVA put the Description into the ShortText (preceeded
+ // Some channels put the Description into the ShortText (preceeded
// by a blank) if there is no actual ShortText and the Description
// is short enough:
//
@@ -327,7 +331,7 @@ void cEvent::FixEpgBugs(void)
}
}
- // Pro7 sometimes repeats the Title in the ShortText:
+ // Sometimes they repeat the Title in the ShortText:
//
// Title
// Title
@@ -338,7 +342,7 @@ void cEvent::FixEpgBugs(void)
EpgBugFixStat(3, ChannelID());
}
- // ZDF.info puts the ShortText between double quotes, which is nothing
+ // Some channels put the ShortText between double quotes, which is nothing
// but annoying (some even put a '.' after the closing '"'):
//
// Title