* (No subject)
@ 2012-07-17 16:16 Ross Burton
2012-07-17 16:16 ` [PATCH 1/2] connman: fix build with automake 1.12 Ross Burton
2012-07-17 16:16 ` [PATCH 2/2] connman: fix crashes on startup on PPC/MIPS Ross Burton
0 siblings, 2 replies; 3+ messages in thread
From: Ross Burton @ 2012-07-17 16:16 UTC (permalink / raw)
To: openembedded-core
Two patches to follow up Andrei Gherzan's connman series. The first applies
to master, the second only applies on his branch.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 1/2] connman: fix build with automake 1.12
2012-07-17 16:16 (No subject) Ross Burton
@ 2012-07-17 16:16 ` Ross Burton
2012-07-17 16:16 ` [PATCH 2/2] connman: fix crashes on startup on PPC/MIPS Ross Burton
1 sibling, 0 replies; 3+ messages in thread
From: Ross Burton @ 2012-07-17 16:16 UTC (permalink / raw)
To: openembedded-core
Automake was not installing /usr/lib/connman/plugins, but we need that installed.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/recipes-connectivity/connman/connman.inc | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/meta/recipes-connectivity/connman/connman.inc b/meta/recipes-connectivity/connman/connman.inc
index 58cac0b..72d22b6 100644
--- a/meta/recipes-connectivity/connman/connman.inc
+++ b/meta/recipes-connectivity/connman/connman.inc
@@ -72,6 +72,10 @@ do_install_append() {
# We don't need to package an empty directory
rmdir ${D}${libdir}/connman/scripts
+
+ # Automake 1.12 won't install empty directories, but we need the
+ # plugins directory to be present for ownership
+ mkdir -p ${D}${libdir}/connman/plugins
}
# These used to be plugins, but now they are core
--
1.7.10
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 2/2] connman: fix crashes on startup on PPC/MIPS
2012-07-17 16:16 (No subject) Ross Burton
2012-07-17 16:16 ` [PATCH 1/2] connman: fix build with automake 1.12 Ross Burton
@ 2012-07-17 16:16 ` Ross Burton
1 sibling, 0 replies; 3+ messages in thread
From: Ross Burton @ 2012-07-17 16:16 UTC (permalink / raw)
To: openembedded-core
It appears that when there is no existing connman state there is memory
corruption which causes free() on MIPS/PPC to abort.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
...ck-that-the-string-isn-t-empty-before-spl.patch | 37 ++++++++++++++++++++
meta/recipes-connectivity/connman/connman_1.3.bb | 5 +--
2 files changed, 40 insertions(+), 2 deletions(-)
create mode 100644 meta/recipes-connectivity/connman/connman/0001-storage-check-that-the-string-isn-t-empty-before-spl.patch
diff --git a/meta/recipes-connectivity/connman/connman/0001-storage-check-that-the-string-isn-t-empty-before-spl.patch b/meta/recipes-connectivity/connman/connman/0001-storage-check-that-the-string-isn-t-empty-before-spl.patch
new file mode 100644
index 0000000..c92b586
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/0001-storage-check-that-the-string-isn-t-empty-before-spl.patch
@@ -0,0 +1,37 @@
+From ea8c7b3efce4c1762411e073893e948de5d552d6 Mon Sep 17 00:00:00 2001
+From: Ross Burton <ross.burton@intel.com>
+Date: Tue, 17 Jul 2012 16:04:12 +0100
+Subject: [PATCH] storage: check that the string isn't empty before splitting
+
+If the string was non-NULL but empty (str="\0"), the following \0 assignment
+would write to str[-1] and thus cause memory corruption.
+
+On PPC and MIPS, this was causing crashes in glibc.
+
+Signed-off-by: Ross Burton <ross.burton@intel.com>
+Upstream-Status: Submitted
+
+---
+ src/storage.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/src/storage.c b/src/storage.c
+index 47bd0cb..20766a3 100644
+--- a/src/storage.c
++++ b/src/storage.c
+@@ -212,7 +212,11 @@ gchar **connman_storage_get_services()
+ closedir(dir);
+
+ str = g_string_free(result, FALSE);
+- if (str) {
++ if (str && str[0] != '\0') {
++ /*
++ * Remove the trailing separator so that services doesn't end up
++ * with an empty element.
++ */
+ str[strlen(str) - 1] = '\0';
+ services = g_strsplit(str, "/", -1);
+ }
+--
+1.7.10.4
+
diff --git a/meta/recipes-connectivity/connman/connman_1.3.bb b/meta/recipes-connectivity/connman/connman_1.3.bb
index a9faf74..ae688c9 100644
--- a/meta/recipes-connectivity/connman/connman_1.3.bb
+++ b/meta/recipes-connectivity/connman/connman_1.3.bb
@@ -7,6 +7,7 @@ SRC_URI = "git://git.kernel.org/pub/scm/network/connman/connman.git \
file://add_xuser_dbus_permission.patch \
file://connman \
file://0001-storage.c-If-there-is-no-d_type-support-use-stat.patch \
- file://0002-timezone.c-If-there-is-no-d_type-support-use-stat.patch"
+ file://0002-timezone.c-If-there-is-no-d_type-support-use-stat.patch \
+ file://storage-check-that-the-string-isn-t-empty-before-spl.patch"
S = "${WORKDIR}/git"
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
--
1.7.10
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-17 16:28 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-17 16:16 (No subject) Ross Burton
2012-07-17 16:16 ` [PATCH 1/2] connman: fix build with automake 1.12 Ross Burton
2012-07-17 16:16 ` [PATCH 2/2] connman: fix crashes on startup on PPC/MIPS Ross Burton
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.