* [meta-multimedia][PATCH 1/2] cdparanoia: Fix build with security flags
@ 2017-06-27 5:57 Khem Raj
2017-06-27 5:57 ` [meta-networking][PATCH 2/2] rdate: Fix build with hardening Khem Raj
0 siblings, 1 reply; 2+ messages in thread
From: Khem Raj @ 2017-06-27 5:57 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../cdparanoia/cdparanoia_10.2.bb | 4 ++-
...-for-null-buffer-before-trying-a-byteswap.patch | 31 +++++++++++++++++++++
.../files/0002-Fix-printf-format-errors.patch | 32 ++++++++++++++++++++++
3 files changed, 66 insertions(+), 1 deletion(-)
create mode 100644 meta-multimedia/recipes-multimedia/cdparanoia/files/0001-check-for-null-buffer-before-trying-a-byteswap.patch
create mode 100644 meta-multimedia/recipes-multimedia/cdparanoia/files/0002-Fix-printf-format-errors.patch
diff --git a/meta-multimedia/recipes-multimedia/cdparanoia/cdparanoia_10.2.bb b/meta-multimedia/recipes-multimedia/cdparanoia/cdparanoia_10.2.bb
index e846e3a97..30d71ff2c 100644
--- a/meta-multimedia/recipes-multimedia/cdparanoia/cdparanoia_10.2.bb
+++ b/meta-multimedia/recipes-multimedia/cdparanoia/cdparanoia_10.2.bb
@@ -13,7 +13,9 @@ SRC_URI = "http://downloads.xiph.org/releases/cdparanoia/cdparanoia-III-${PV}.sr
file://0003-Fix-missing-shared-object-LDFLAGS.patch \
file://dont-use-internal-configs.patch \
file://out-of-tree-build.patch \
-"
+ file://0001-check-for-null-buffer-before-trying-a-byteswap.patch \
+ file://0002-Fix-printf-format-errors.patch \
+ "
SRC_URI[md5sum] = "b304bbe8ab63373924a744eac9ebc652"
SRC_URI[sha256sum] = "005db45ef4ee017f5c32ec124f913a0546e77014266c6a1c50df902a55fe64df"
diff --git a/meta-multimedia/recipes-multimedia/cdparanoia/files/0001-check-for-null-buffer-before-trying-a-byteswap.patch b/meta-multimedia/recipes-multimedia/cdparanoia/files/0001-check-for-null-buffer-before-trying-a-byteswap.patch
new file mode 100644
index 000000000..682cf6e03
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/cdparanoia/files/0001-check-for-null-buffer-before-trying-a-byteswap.patch
@@ -0,0 +1,31 @@
+From c760c5d31f2412a5be5ac6896e6069d1cea08527 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 26 Jun 2017 22:31:45 -0700
+Subject: [PATCH 1/2] check for null buffer before trying a byteswap
+
+Author: Monty <paranoia@xiph.org>
+
+Patch from debian
+http://sources.debian.net/src/cdparanoia/3.10.2%2Bdebian-11/debian/patches/04-endian.patch
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ interface/interface.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/interface/interface.c b/interface/interface.c
+index 526c2a9..763a0ea 100644
+--- a/interface/interface.c
++++ b/interface/interface.c
+@@ -118,7 +118,7 @@ long cdda_read_timed(cdrom_drive *d, void *buffer, long beginsector, long sector
+ if(d->bigendianp==-1) /* not determined yet */
+ d->bigendianp=data_bigendianp(d);
+
+- if(d->bigendianp!=bigendianp()){
++ if(buffer && d->bigendianp!=bigendianp()){
+ int i;
+ u_int16_t *p=(u_int16_t *)buffer;
+ long els=sectors*CD_FRAMESIZE_RAW/2;
+--
+2.13.2
+
diff --git a/meta-multimedia/recipes-multimedia/cdparanoia/files/0002-Fix-printf-format-errors.patch b/meta-multimedia/recipes-multimedia/cdparanoia/files/0002-Fix-printf-format-errors.patch
new file mode 100644
index 000000000..024479ca7
--- /dev/null
+++ b/meta-multimedia/recipes-multimedia/cdparanoia/files/0002-Fix-printf-format-errors.patch
@@ -0,0 +1,32 @@
+From f4f81bdadb9515938b3b5d13707bd4b9322fd967 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 26 Jun 2017 22:37:13 -0700
+Subject: [PATCH 2/2] Fix printf format errors
+
+error: format not a string literal and no format arguments
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ main.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/main.c b/main.c
+index 664acac..d568fb1 100644
+--- a/main.c
++++ b/main.c
+@@ -588,10 +588,10 @@ static void callback(long inpos, int function){
+ buffer[aheadposition+19]='>';
+ }
+
+- fprintf(stderr,buffer);
++ fprintf(stderr, "%s", buffer);
+
+ if (logfile != NULL && function==-1) {
+- fprintf(logfile,buffer+1);
++ fprintf(logfile, "%s", buffer+1);
+ fprintf(logfile,"\n\n");
+ fflush(logfile);
+ }
+--
+2.13.2
+
--
2.13.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [meta-networking][PATCH 2/2] rdate: Fix build with hardening
2017-06-27 5:57 [meta-multimedia][PATCH 1/2] cdparanoia: Fix build with security flags Khem Raj
@ 2017-06-27 5:57 ` Khem Raj
0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2017-06-27 5:57 UTC (permalink / raw)
To: openembedded-devel
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
.../0001-src-rdate-Fix-printf-format-errors.patch | 33 ++++++++++++++++++++++
.../recipes-connectivity/rdate/rdate_1.5.bb | 4 ++-
2 files changed, 36 insertions(+), 1 deletion(-)
create mode 100644 meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch
diff --git a/meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch b/meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch
new file mode 100644
index 000000000..2f6518984
--- /dev/null
+++ b/meta-networking/recipes-connectivity/rdate/rdate/0001-src-rdate-Fix-printf-format-errors.patch
@@ -0,0 +1,33 @@
+From f58bcb43c31d08de58853b088681cbe4df36cbf9 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Mon, 26 Jun 2017 22:50:56 -0700
+Subject: [PATCH] src/rdate: Fix printf format errors
+
+Fixes
+
+rdate.c:85:41: error: format not a string literal and no format arguments [-Werror=format-security]
+| syslog(is_error?LOG_WARNING:LOG_INFO, buf);
+
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+Upstream-Status: Submitted
+
+ src/rdate.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/rdate.c b/src/rdate.c
+index 5c3e829..943d481 100644
+--- a/src/rdate.c
++++ b/src/rdate.c
+@@ -82,7 +82,7 @@ write_log(int is_error, char *format, ...)
+ return; /* Error, which we can't report because this _is_ the error
+ reporting mechanism */
+ if(log_mode)
+- syslog(is_error?LOG_WARNING:LOG_INFO, buf);
++ syslog(is_error?LOG_WARNING:LOG_INFO, "%s", buf);
+ if(is_error || print_mode)
+ fprintf(is_error?stderr:stdout, "%s: %s\n", argv0, buf);
+ }
+--
+2.13.2
+
diff --git a/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb b/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb
index 818f16a52..b3af9275e 100644
--- a/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb
+++ b/meta-networking/recipes-connectivity/rdate/rdate_1.5.bb
@@ -11,7 +11,9 @@ SECTION = "Applications/System"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3"
-SRC_URI= "https://www.aelius.com/njh/${BPN}/${BP}.tar.gz"
+SRC_URI = "https://www.aelius.com/njh/${BPN}/${BP}.tar.gz \
+ file://0001-src-rdate-Fix-printf-format-errors.patch \
+ "
SRC_URI[md5sum] = "0a4f612480777fdf25264ac03c57eae6"
SRC_URI[sha256sum] = "6e800053eaac2b21ff4486ec42f0aca7214941c7e5fceedd593fa0be99b9227d"
--
2.13.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-06-27 5:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-27 5:57 [meta-multimedia][PATCH 1/2] cdparanoia: Fix build with security flags Khem Raj
2017-06-27 5:57 ` [meta-networking][PATCH 2/2] rdate: Fix build with hardening Khem Raj
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox