Hello community,

here is the log from the commit of package vdr-plugin-xineliboutput for 
openSUSE:Factory checked in at 2018-02-12 10:15:44
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/vdr-plugin-xineliboutput (Old)
 and      /work/SRC/openSUSE:Factory/.vdr-plugin-xineliboutput.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "vdr-plugin-xineliboutput"

Mon Feb 12 10:15:44 2018 rev:6 rq:575395 version:2.1.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/vdr-plugin-xineliboutput/vdr-plugin-xineliboutput.changes
        2017-03-24 02:21:24.442163169 +0100
+++ 
/work/SRC/openSUSE:Factory/.vdr-plugin-xineliboutput.new/vdr-plugin-xineliboutput.changes
   2018-02-12 10:15:46.988276802 +0100
@@ -1,0 +2,43 @@
+Sat Feb 10 19:12:20 UTC 2018 - seife+...@b1-systems.com
+
+- add xineliboutput-git-bufferoverflow.diff to fix buffer size
+  calculation in rle_compress_argbrle()
+
+-------------------------------------------------------------------
+Sat Feb 10 17:37:43 UTC 2018 - seife+...@b1-systems.com
+
+- add patch xineliboutput-2.1.0...977ff0.diff to commit 977ff04820
+  from 2018-01-20
+  * buffer overflow fixes
+  * integer overflow fixes
+  * memleak fixes
+  * other bugfixes
+
+-------------------------------------------------------------------
+Fri Feb  9 12:33:49 UTC 2018 - seife+...@b1-systems.com
+
+- fix build on Leap by adding -std=c99 compiler option
+
+-------------------------------------------------------------------
+Fri Feb  9 08:42:29 UTC 2018 - seife+...@b1-systems.com
+
+- update to version 2.1.0 (2018-01-10):
+  - Fixed HD buffering issues with recent xine-lib versions
+  - Fixed concatenating multiple --post command line options
+  - Fixed leaks
+  - Added ARGB overlay compression
+  - Added mapping of F11 key to fullscreen toggle (sxfe)
+  - Added check for missing xine plugins
+  - Improved stability and error resilence
+  - Improved portability
+  - Default to OpenGL 2 video output when available. Warn when
+    inefficient video output is used
+  - "Dust removal"
+- add vdr-xineliboutput-2.1-pie.diff to build PIE executables
+
+-------------------------------------------------------------------
+Fri Feb  9 08:37:50 UTC 2018 - seife+...@b1-systems.com
+
+- rework X11 buildrequires
+
+-------------------------------------------------------------------

Old:
----
  vdr-xineliboutput-2.0.0.tgz

New:
----
  vdr-xineliboutput-2.1-pie.diff
  vdr-xineliboutput-2.1.0.tgz
  xineliboutput-2.1.0...977ff0.diff
  xineliboutput-git-bufferoverflow.diff

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ vdr-plugin-xineliboutput.spec ++++++
--- /var/tmp/diff_new_pack.S4oJy5/_old  2018-02-12 10:15:47.900243939 +0100
+++ /var/tmp/diff_new_pack.S4oJy5/_new  2018-02-12 10:15:47.904243795 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package vdr-plugin-xineliboutput
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %define pluginname xineliboutput
 %define pluginurl http://sourceforge.net/projects/xineliboutput/
 Name:           vdr-plugin-xineliboutput
-Version:        2.0.0
+Version:        2.1.0
 Release:        0
 Summary:        VDR %{pluginname} plugin
 License:        GPL-2.0
@@ -28,24 +28,30 @@
 Source:         
https://downloads.sourceforge.net/project/xineliboutput/xineliboutput/vdr-%{pluginname}-%{version}/vdr-%{pluginname}-%{version}.tgz
 Source1:        remote.conf
 Source2:        xineliboutput_allowed_hosts.conf
-%if 0%{?suse_version} < 1200
-BuildRequires:  Mesa-devel
-%else
+Patch1:         vdr-xineliboutput-2.1-pie.diff
+Patch2:         xineliboutput-2.1.0...977ff0.diff
+Patch3:         xineliboutput-git-bufferoverflow.diff
 BuildRequires:  Mesa-libGL-devel
 BuildRequires:  Mesa-libGLU-devel
-BuildRequires:  libavutil-devel
-BuildRequires:  libbluray-devel
-BuildRequires:  libvdpau-devel
-%endif
 BuildRequires:  dbus-1-glib-devel
 BuildRequires:  gcc-c++
+BuildRequires:  libavutil-devel
+BuildRequires:  libbluray-devel
 BuildRequires:  libcap-devel
 BuildRequires:  libjpeg-devel
+BuildRequires:  libvdpau-devel
 BuildRequires:  pkg-config
 BuildRequires:  vdr-devel
 BuildRequires:  xine-devel
-BuildRequires:  xorg-x11-devel
 BuildRequires:  pkgconfig(libcec)
+BuildRequires:  pkgconfig(xext)
+BuildRequires:  pkgconfig(xinerama)
+BuildRequires:  pkgconfig(xrandr)
+BuildRequires:  pkgconfig(xrender)
+## these are asked for by configure but not present. Still everything works ;-)
+#BuildRequires:  pkgconfig(xdpms)
+#BuildRequires:  pkgconfig(xshape)
+#BuildRequires:  pkgconfig(xshm)
 # FIXME: use proper Requires(pre/post/preun/...)
 PreReq:         %{vdr_prereq}
 # only needef for packages that used the old naming scheme
@@ -68,12 +74,16 @@
 
 %prep
 %setup -q -n %{pluginname}-%{version}
+%patch1 -p1
+%patch2 -p1
+%patch3 -p1
 cp %{SOURCE1} .
 
 %build
 # use msgmerge wrapper
 export PATH=%{_datadir}/vdr:$PATH
-make %{?_smp_mflags}
+# "gcc -std=c99" is needed by Leap 42.3 gcc
+make %{?_smp_mflags} CC="gcc -std=c99"
 
 %install
 make install DESTDIR=%{buildroot}

++++++ vdr-xineliboutput-2.1-pie.diff ++++++
diff --git a/Makefile b/Makefile
index 04ef330..6f238ac 100644
--- a/Makefile
+++ b/Makefile
@@ -269,7 +269,7 @@ DEFINES += -Wall
 ###
 
 mpg2c: mpg2c.c
-       $(CC) $(CFLAGS) $(LDFLAGS) mpg2c.c -o $@
+       $(CC) $(CFLAGS) $(LDFLAGS) -pie mpg2c.c -o $@
 
 # data
 black_720x576.c: mpg2c black_720x576.mpg
@@ -365,7 +365,7 @@ ifeq ($(VDR_TREE), yes)
        $(INSTALL) $@ $(LIBDIR)/
 endif
 $(VDRSXFE): $(OBJS_SXFE)
-       $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_SXFE) $(LIBS_X11) $(LIBS_XINE) 
$(LIBS_JPEG) $(LIBS_CEC) $(LIBS_PTHREAD) -o $@
+       $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_SXFE) $(LIBS_X11) $(LIBS_XINE) 
$(LIBS_JPEG) $(LIBS_CEC) $(LIBS_PTHREAD) -pie -o $@
 
 #
 # vdr-fbfe
@@ -377,7 +377,7 @@ ifeq ($(VDR_TREE), yes)
        $(INSTALL) $@ $(LIBDIR)/
 endif
 $(VDRFBFE): $(OBJS_FBFE)
-       $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_FBFE) $(LIBS_XINE) $(LIBS_JPEG) 
$(LIBS_CEC) $(LIBS_PTHREAD) -o $@
+       $(CC) $(CFLAGS) $(LDFLAGS) $(OBJS_FBFE) $(LIBS_XINE) $(LIBS_JPEG) 
$(LIBS_CEC) $(LIBS_PTHREAD) -pie -o $@
 
 #
 # xine plugins
++++++ vdr-xineliboutput-2.0.0.tgz -> vdr-xineliboutput-2.1.0.tgz ++++++
++++ 3284 lines of diff (skipped)

++++++ xineliboutput-2.1.0...977ff0.diff ++++++
++++ 1408 lines (skipped)

++++++ xineliboutput-git-bufferoverflow.diff ++++++
diff --git a/tools/rle.c b/tools/rle.c
index 2c944c7..f108dd2 100644
--- a/tools/rle.c
+++ b/tools/rle.c
@@ -19,6 +19,7 @@
 #include "osd_command.h"
 
 #include "rle.h"
+#include "../logdefs.h"
 
 
 #undef  MAX
@@ -271,9 +272,14 @@ size_t rle_compress_argbrle(uint8_t **rle_data, const 
uint32_t *data,
   for (y = 0; y < h; y++) {
 
     /* grow buffer ? */
-    if ((ssize_t)(rle_size - ((const uint8_t *)rle - *rle_data)) < w * 4 * 4) {
-      size_t used = (const uint8_t *)rle - *rle_data;
-      rle_size = rle_size < 1 ? w*h/16 : rle_size*2;
+    size_t used = rle - *rle_data;
+    /* RLE worst case is 4 bytes => 6 bytes, factor 1.5 */
+    if ((ssize_t)(rle_size - ((const uint8_t *)rle - *rle_data)) < w * 6) {
+      /* start with about two to three lines buffer, then try to guess a
+       * good size based on the previously used space. Add one line to
+       * make sure rle_size always grows here */
+      rle_size = rle_size < 1 ? w*6*2 : rle_size * h / y + w*6;
+      // LOGMSG("rle_size: %zu used: %zu w: %u h: %u y: %d\n", rle_size, used, 
w, h, y);
       *rle_data = realloc(*rle_data, rle_size);
       rle = *rle_data + used;
     }
@@ -287,24 +293,40 @@ size_t rle_compress_argbrle(uint8_t **rle_data, const 
uint32_t *data,
       if (data[x] == color) {
         len++;
       } else {
+        int need = (len < 64) ? 6 : 7;
+        if (used + need > rle_size) {
+          LOGERR("%s:%d not enough space\n", __func__, __LINE__);
+          goto out;
+        }
         rle = write_rle_argb(rle, color, len);
         (*num_rle)++;
         color = data[x];
         len   = 1;
+        used = rle - *rle_data;
       }
     }
 
     if (len) {
+      int need = (len < 64) ? 6 : 7;
+      if (used + need > rle_size) {
+        LOGERR("%s:%d not enough space\n", __func__, __LINE__);
+        break;
+      }
       rle = write_rle_argb(rle, color, len);
       (*num_rle)++;
+      used = rle - *rle_data;
     }
 
     /* end of line marker */
+    if (used + 6 > rle_size) {
+      LOGERR("%s:%d not enough space\n", __func__, __LINE__);
+      break;
+    }
     rle = write_rle_argb(rle, 0, 0);
     (*num_rle)++;
     data += w;
   }
-
+ out:
   return (rle - *rle_data);
 }
 
diff --git a/xine_input_vdr.c b/xine_input_vdr.c
index 3ebc6e6..9a04fe7 100644
--- a/xine_input_vdr.c
+++ b/xine_input_vdr.c
@@ -138,6 +138,7 @@ typedef struct {
 #  include <linux/unistd.h> /* syscall(__NR_gettid) */
 #endif
 
+int SysLogLevel = 1;
 static const char log_module_input_vdr[] = "[input_vdr] ";
 #define LOG_MODULENAME log_module_input_vdr
 #define SysLogLevel    iSysLogLevel

Reply via email to