Skip to content

Commit

Permalink
faac: Fix with with security flags and on musl
Browse files Browse the repository at this point in the history
Signed-off-by: Khem Raj <raj.khem@gmail.com>
  • Loading branch information
kraj committed Mar 29, 2017
1 parent 3aa2e2d commit 4f105f6
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 1 deletion.
8 changes: 7 additions & 1 deletion meta-multimedia/recipes-multimedia/faac/faac_1.28.bb
Expand Up @@ -9,14 +9,20 @@ inherit autotools-brokensep
SRC_URI = "${SOURCEFORGE_MIRROR}/faac/${BP}.tar.gz \
file://build-fix.patch \
file://address-gcc-6-narrowing-errors.patch \
"
file://0001-frontend-Fix-format-string-security-error.patch \
file://0002-mp4v2-Define-__STRING-if-cdefs.h-does-not-exist.patch \
"

SRC_URI[md5sum] = "80763728d392c7d789cde25614c878f6"
SRC_URI[sha256sum] = "c5141199f4cfb17d749c36ba8cfe4b25f838da67c22f0fec40228b6b9c3d19df"

EXTRA_OECONF += "--without-mp4v2"

PACKAGES =+ "lib${BPN} lib${BPN}-dev"

FILES_${PN} = " ${bindir}/faac "
FILES_lib${PN} = " ${libdir}/libfaac.so.*"
FILES_lib${PN}-dev = "${includedir}/faac.h ${includedir}/faaccfg.h ${libdir}/libfaac.so ${libdir}/libfaac.la"
FILES_lib${PN}-staticdev = "${libdir}/libfaac.a"

TOOLCHAIN = "gcc"
@@ -0,0 +1,26 @@
From c1d7a8b992dc36d0012cc3d54b7d3abf4ad4d5d8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 28 Mar 2017 21:33:01 -0700
Subject: [PATCH 1/2] frontend: Fix format string security error

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
frontend/main.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/frontend/main.c b/frontend/main.c
index 02146a8..cb9329c 100644
--- a/frontend/main.c
+++ b/frontend/main.c
@@ -715,7 +715,7 @@ int main(int argc, char *argv[])
break;
#endif
case 'L':
- fprintf(stderr, faac_copyright_string);
+ fprintf(stderr, "%s", faac_copyright_string);
dieMessage = license;
break;
case 'X':
--
2.12.1

@@ -0,0 +1,28 @@
From 46cc9298c38b9dd735fec3f39aa2d6e56a362410 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Tue, 28 Mar 2017 21:33:36 -0700
Subject: [PATCH 2/2] mp4v2: Define __STRING if cdefs.h does not exist

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
common/mp4v2/mp4util.h | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/common/mp4v2/mp4util.h b/common/mp4v2/mp4util.h
index 1f9cb64..1e7aced 100644
--- a/common/mp4v2/mp4util.h
+++ b/common/mp4v2/mp4util.h
@@ -23,6 +23,10 @@
#define __MP4_UTIL_INCLUDED__
#include <assert.h>

+#ifndef __STRING
+#define __STRING(x) #x
+#endif
+
#ifndef ASSERT
#define ASSERT(expr) \
if (!(expr)) { \
--
2.12.1

0 comments on commit 4f105f6

Please sign in to comment.