[packages/xevd] - added comparison fix from git

qboosh qboosh at pld-linux.org
Sun Apr 14 13:44:25 CEST 2024


commit e57aef5e40f1ad1d0251b5228ccc6c6276e8a951
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Sun Apr 14 12:51:37 2024 +0200

    - added comparison fix from git

 xevd-comparison.patch | 39 +++++++++++++++++++++++++++++++++++++++
 xevd.spec             |  2 ++
 2 files changed, 41 insertions(+)
---
diff --git a/xevd.spec b/xevd.spec
index 1fe7c66..c0da41a 100644
--- a/xevd.spec
+++ b/xevd.spec
@@ -16,6 +16,7 @@ Source0:	https://github.com/mpeg5/xevd/archive/v%{gitref}/%{name}-%{gitref}.tar.
 Patch0:		%{name}-string.patch
 Patch1:		%{name}-link.patch
 Patch2:		%{name}-dangling-pointer.patch
+Patch3:		%{name}-comparison.patch
 URL:		https://github.com/mpeg5/xevd
 BuildRequires:	cmake >= 3.5
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
@@ -130,6 +131,7 @@ Statyczna biblioteka XEVD (profil Baseline).
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 echo "v%{version}" > version.txt
 
diff --git a/xevd-comparison.patch b/xevd-comparison.patch
new file mode 100644
index 0000000..4561426
--- /dev/null
+++ b/xevd-comparison.patch
@@ -0,0 +1,39 @@
+From e4ae0c567a6ec5e10c9f5ed44c61e4e3b6816c16 Mon Sep 17 00:00:00 2001
+From: Neal Gompa <neal at gompa.dev>
+Date: Wed, 18 Oct 2023 08:31:03 -0400
+Subject: [PATCH] app: Fix invalid comparison of c_buf in write_y4m_header
+
+This fixes the following error:
+
+/builddir/build/BUILD/xevd-0.4.1/app/xevd_app.c: In function 'write_y4m_header':
+/builddir/build/BUILD/xevd-0.4.1/app/xevd_app.c:300:15: error: the comparison will always evaluate as 'false' for the address of 'c_buf' will never be NULL [-Werror=address]
+  300 |     if (c_buf == NULL)
+      |               ^~
+---
+ app/xevd_app.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/app/xevd_app.c b/app/xevd_app.c
+index abc1f17..ed1fbcd 100644
+--- a/app/xevd_app.c
++++ b/app/xevd_app.c
+@@ -273,8 +273,8 @@ static int write_y4m_header(char * fname, XEVD_IMGB * img)
+     int bit_depth  =   op_out_bit_depth;
+     int len = 80;
+     int buff_len = 0;
+-    char buf[80] = { 0, };
+-    char c_buf[16] = { 0, };
++    char buf[80] = { '\0', };
++    char c_buf[16] = { '\0', };
+     FILE          * fp;
+ 
+     if (color_format == XEVD_CF_YCBCR420)
+@@ -297,7 +297,7 @@ static int write_y4m_header(char * fname, XEVD_IMGB * img)
+         if (bit_depth == 8)  strcpy(c_buf, "mono");
+     }
+ 
+-    if (c_buf == NULL)
++    if (strlen(c_buf) == 0)
+     {
+         logv0("Color format is not suuported by y4m");
+         return XEVD_ERR;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/xevd.git/commitdiff/e57aef5e40f1ad1d0251b5228ccc6c6276e8a951



More information about the pld-cvs-commit mailing list