[SCM] xbmc-pvr-addons/master: Fix FTBFS due to unsafe usage of snprintf()

rbalint at users.alioth.debian.org rbalint at users.alioth.debian.org
Fri May 23 19:13:28 UTC 2014


The following commit has been merged in the master branch:
commit 59a73bcc25d3dfaf62c39fb1d11426406bd6c222
Author: Balint Reczey <balint at balintreczey.hu>
Date:   Thu May 22 16:49:07 2014 +0200

    Fix FTBFS due to unsafe usage of snprintf()

diff --git a/debian/patches/0001-Fix-unsafe-usage-of-snprintf.patch b/debian/patches/0001-Fix-unsafe-usage-of-snprintf.patch
new file mode 100644
index 0000000..b707e64
--- /dev/null
+++ b/debian/patches/0001-Fix-unsafe-usage-of-snprintf.patch
@@ -0,0 +1,33 @@
+From 10ef1987437805a8adefb4a843c822c08f97e0de Mon Sep 17 00:00:00 2001
+From: Balint Reczey <balint at balintreczey.hu>
+Date: Thu, 22 May 2014 16:45:56 +0200
+Subject: [PATCH] Fix unsafe usage of snprintf()
+
+---
+ addons/pvr.wmc/src/pvr2wmc.cpp | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/addons/pvr.wmc/src/pvr2wmc.cpp b/addons/pvr.wmc/src/pvr2wmc.cpp
+index 094f930..db5cd5e 100644
+--- a/addons/pvr.wmc/src/pvr2wmc.cpp
++++ b/addons/pvr.wmc/src/pvr2wmc.cpp
+@@ -1087,11 +1087,11 @@ PVR_ERROR Pvr2Wmc::SignalStatus(PVR_SIGNAL_STATUS &signalStatus)
+ 			if (results.size() >= 9)
+ 			{
+ 				memset(&cachedSignalStatus, 0, sizeof(cachedSignalStatus));
+-				snprintf(signalStatus.strAdapterName, sizeof(signalStatus.strAdapterName), results[0]);
+-				snprintf(signalStatus.strAdapterStatus, sizeof(signalStatus.strAdapterStatus), results[1]);
+-				snprintf(signalStatus.strProviderName, sizeof(signalStatus.strProviderName), results[2]);
+-				snprintf(signalStatus.strServiceName, sizeof(signalStatus.strServiceName), results[3]);
+-				snprintf(signalStatus.strMuxName, sizeof(signalStatus.strMuxName), results[4]);
++				STRCPY(signalStatus.strAdapterName, results[0].GetBuf());
++				STRCPY(signalStatus.strAdapterStatus, results[1].GetBuf());
++				STRCPY(signalStatus.strProviderName, results[2].GetBuf());
++				STRCPY(signalStatus.strServiceName, results[3].GetBuf());
++				STRCPY(signalStatus.strMuxName, results[4].GetBuf());
+ 				signalStatus.iSignal = atoi(results[5]) * 655.35;
+ 				signalStatus.dVideoBitrate = atof(results[6]);
+ 				signalStatus.dAudioBitrate = atof(results[7]);
+-- 
+1.9.1
+
diff --git a/debian/patches/series b/debian/patches/series
index 147600e..c208947 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
+0001-Fix-unsafe-usage-of-snprintf.patch
 01_use-system-libs.patch

-- 
xbmc-pvr-addons packaging



More information about the pkg-multimedia-commits mailing list