summaryrefslogtreecommitdiff
path: root/recipes
diff options
context:
space:
mode:
authorNirbheek Chauhan <nirbheek@centricular.com>2019-09-17 17:11:49 +0530
committerNirbheek Chauhan <nirbheek@centricular.com>2019-09-23 13:48:24 +0530
commit8d1a6d510da0a8a1274db9a7c99bcac06c620c09 (patch)
tree3191596487927763204397bd97292b777b26e27f /recipes
parent8a4b95694c8684bc0e340810c0d64c80febcb7a1 (diff)
gnutls.recipe: Fix crash when running on Android 10
Closes https://gitlab.freedesktop.org/gstreamer/cerbero/issues/146
Diffstat (limited to 'recipes')
-rw-r--r--recipes/gnutls.recipe3
-rw-r--r--recipes/gnutls/0001-vasnprintf-Don-t-use-n-on-Android.patch42
2 files changed, 44 insertions, 1 deletions
diff --git a/recipes/gnutls.recipe b/recipes/gnutls.recipe
index 183cd49e..04f28fd4 100644
--- a/recipes/gnutls.recipe
+++ b/recipes/gnutls.recipe
@@ -25,7 +25,8 @@ class Recipe(recipe.Recipe):
name + "/0001-Undefine-__USE_MINGW_ANSI_STDIO-as-otherwise-stdio.h.patch",
name + "/0001-pgusage-remove-system-call.patch",
name + "/0001-asm-rename-some-assembly-functions-to-not-conflict-w.patch",
- name + "/0001-Make-headers-MSVC-compatible-when-built-with-GCC.patch",]
+ name + "/0001-Make-headers-MSVC-compatible-when-built-with-GCC.patch",
+ name + "/0001-vasnprintf-Don-t-use-n-on-Android.patch",]
autoreconf = True
files_libs = ['libgnutls', 'libgnutlsxx']
diff --git a/recipes/gnutls/0001-vasnprintf-Don-t-use-n-on-Android.patch b/recipes/gnutls/0001-vasnprintf-Don-t-use-n-on-Android.patch
new file mode 100644
index 00000000..d87974df
--- /dev/null
+++ b/recipes/gnutls/0001-vasnprintf-Don-t-use-n-on-Android.patch
@@ -0,0 +1,42 @@
+From 279479cbad40e1ed364152b43ffdc85b0cc858b4 Mon Sep 17 00:00:00 2001
+From: Nirbheek Chauhan <nirbheek@centricular.com>
+Date: Tue, 17 Sep 2019 17:09:00 +0530
+Subject: [PATCH] vasnprintf: Don't use %n on Android
+
+See: https://gitlab.com/gnutls/gnutls/issues/653
+
+This is fixed in GnuTLS 3.6.x
+---
+ gl/vasnprintf.c | 2 +-
+ src/gl/vasnprintf.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gl/vasnprintf.c b/gl/vasnprintf.c
+index 7f75b9d55..5b2d85fb7 100644
+--- a/gl/vasnprintf.c
++++ b/gl/vasnprintf.c
+@@ -4858,7 +4858,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
+ #endif
+ *fbp = dp->conversion;
+ #if USE_SNPRINTF
+-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
++# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined(__ANDROID__))
+ fbp[1] = '%';
+ fbp[2] = 'n';
+ fbp[3] = '\0';
+diff --git a/src/gl/vasnprintf.c b/src/gl/vasnprintf.c
+index f85c69d56..3a4aef68b 100644
+--- a/src/gl/vasnprintf.c
++++ b/src/gl/vasnprintf.c
+@@ -4858,7 +4858,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
+ #endif
+ *fbp = dp->conversion;
+ #if USE_SNPRINTF
+-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
++# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined(__ANDROID__))
+ fbp[1] = '%';
+ fbp[2] = 'n';
+ fbp[3] = '\0';
+--
+2.21.0
+