From 5428bbd10afac21eb11fdaacf73adb4977279dc8 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Sat, 26 Dec 2015 22:14:39 +0100 Subject: [PATCH 1/2] libosmocore: Code is not in master so don't force SHA validation The 0.9.0 release is in a different branch (+patches) and it is easier to not write the branch name here. --- recipes-osmocom/libosmocore/libosmocore_git.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes-osmocom/libosmocore/libosmocore_git.bb b/recipes-osmocom/libosmocore/libosmocore_git.bb index e8db2bc99a..9101886c66 100644 --- a/recipes-osmocom/libosmocore/libosmocore_git.bb +++ b/recipes-osmocom/libosmocore/libosmocore_git.bb @@ -2,7 +2,7 @@ require ${PN}.inc S = "${WORKDIR}/git" SRCREV = "70fcbda6dd733a503e9a046e01986d8bfc2e2bb2" -SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git" +SRC_URI = "git://git.osmocom.org/libosmocore.git;protocol=git;nobranch=1" PV = "0.9.0+gitr${SRCPV}" PR = "r0" From 87c73f768c84613f07e704026f3b6eff9459cfd0 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 8 Jan 2016 13:01:03 +0100 Subject: [PATCH 2/2] sofia-sip: Fix undefined behavior in parsing Symptoms with LCR: nta outgoing create: invalid URI Take patch posted to the upstream project and carried by Debian and Ubuntu for this project. Unroll the different fields by hand to fix undefined behavior. --- .../sofia-sip/files/msg_parser.c.diff | 35 +++++++++++++++++++ recipes-misc/sofia-sip/sofia-sip.inc | 5 ++- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 recipes-misc/sofia-sip/files/msg_parser.c.diff diff --git a/recipes-misc/sofia-sip/files/msg_parser.c.diff b/recipes-misc/sofia-sip/files/msg_parser.c.diff new file mode 100644 index 0000000000..66c73395de --- /dev/null +++ b/recipes-misc/sofia-sip/files/msg_parser.c.diff @@ -0,0 +1,35 @@ +--- sofia-sip-1.12.11+20110422.1.orig/libsofia-sip-ua/msg/msg_parser.c ++++ sofia-sip-1.12.11+20110422.1/libsofia-sip-ua/msg/msg_parser.c +@@ -2468,8 +2468,6 @@ + msg_header_t ** + msg_hclass_offset(msg_mclass_t const *mc, msg_pub_t const *mo, msg_hclass_t *hc) + { +- int i; +- + assert(mc && hc); + + if (mc == NULL || hc == NULL) +@@ -2484,9 +2482,20 @@ + } + else + /* Header has no name. */ +- for (i = 0; i <= 6; i++) +- if (hc->hc_hash == mc->mc_request[i].hr_class->hc_hash) +- return (msg_header_t **)((char *)mo + mc->mc_request[i].hr_offset); ++ if (hc->hc_hash == mc->mc_request[0].hr_class->hc_hash) ++ return (msg_header_t **)((char *)mo + mc->mc_request[0].hr_offset); ++ else if (hc->hc_hash == mc->mc_status[0].hr_class->hc_hash) ++ return (msg_header_t **)((char *)mo + mc->mc_status[0].hr_offset); ++ else if (hc->hc_hash == mc->mc_separator[0].hr_class->hc_hash) ++ return (msg_header_t **)((char *)mo + mc->mc_separator[0].hr_offset); ++ else if (hc->hc_hash == mc->mc_payload[0].hr_class->hc_hash) ++ return (msg_header_t **)((char *)mo + mc->mc_payload[0].hr_offset); ++ else if (hc->hc_hash == mc->mc_unknown[0].hr_class->hc_hash) ++ return (msg_header_t **)((char *)mo + mc->mc_unknown[0].hr_offset); ++ else if (hc->hc_hash == mc->mc_error[0].hr_class->hc_hash) ++ return (msg_header_t **)((char *)mo + mc->mc_error[0].hr_offset); ++ else if (hc->hc_hash == mc->mc_multipart[0].hr_class->hc_hash) ++ return (msg_header_t **)((char *)mo + mc->mc_multipart[0].hr_offset); + + return NULL; + } diff --git a/recipes-misc/sofia-sip/sofia-sip.inc b/recipes-misc/sofia-sip/sofia-sip.inc index cd987faa6d..d282ed11cf 100644 --- a/recipes-misc/sofia-sip/sofia-sip.inc +++ b/recipes-misc/sofia-sip/sofia-sip.inc @@ -5,7 +5,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=03068f550c635f6520e0f0252da412fc" SECTION = "libs" DEPENDS = "glib-2.0 openssl" -SRC_URI = "${SOURCEFORGE_MIRROR}/${PN}/${P}.tar.gz" +SRC_URI = "\ + ${SOURCEFORGE_MIRROR}/${PN}/${P}.tar.gz \ + file://msg_parser.c.diff \ + " inherit autotools pkgconfig