aboutsummaryrefslogtreecommitdiff
path: root/multimedia/vdr-plugin-ttxtsubs/files/patch-ttxtsubschannelsettings.c
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/vdr-plugin-ttxtsubs/files/patch-ttxtsubschannelsettings.c')
-rw-r--r--multimedia/vdr-plugin-ttxtsubs/files/patch-ttxtsubschannelsettings.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/multimedia/vdr-plugin-ttxtsubs/files/patch-ttxtsubschannelsettings.c b/multimedia/vdr-plugin-ttxtsubs/files/patch-ttxtsubschannelsettings.c
new file mode 100644
index 000000000000..8f590491d631
--- /dev/null
+++ b/multimedia/vdr-plugin-ttxtsubs/files/patch-ttxtsubschannelsettings.c
@@ -0,0 +1,23 @@
+--- a/ttxtsubschannelsettings.c
++++ b/ttxtsubschannelsettings.c
+@@ -34,10 +34,19 @@ cTtxtSubsChannelSetting::cTtxtSubsChanne
+ bool cTtxtSubsChannelSetting::Parse(const char *s)
+ {
+ bool result=false;
++#ifdef __FreeBSD__
++ char *buffer=MALLOC(char, 256);
++#else
+ char *buffer=NULL;
++#endif
+ int PageMode;
+ int PageNumber;
+- if (3 == sscanf(s, "%a[^,],%d,%d\n", &buffer, &PageMode, &PageNumber)) {
++#ifdef __FreeBSD__
++ if (3 == sscanf(s, "%255[^,],%d,%d\n", buffer, &PageMode, &PageNumber))
++#else
++ if (3 == sscanf(s, "%a[^,],%d,%d\n", &buffer, &PageMode, &PageNumber))
++#endif
++ {
+ tChannelID channelID=tChannelID::FromString(buffer);
+ if (channelID.Valid()) {
+ channelid=channelID;