From f7fe759fe2d32fe361735035bd764d944af518b6 Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 7 Mar 2021 12:21:40 +0100 Subject: [PATCH 1/2] pjproject: add patch for AST-2021-005 https://downloads.asterisk.org/pub/security/AST-2021-005.html https://issues.asterisk.org/jira/browse/ASTERISK-29196 Signed-off-by: Sebastian Kemper --- .../0070-fix-sdp-neg-modify-local-offer.patch | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 libs/pjproject/patches/0070-fix-sdp-neg-modify-local-offer.patch diff --git a/libs/pjproject/patches/0070-fix-sdp-neg-modify-local-offer.patch b/libs/pjproject/patches/0070-fix-sdp-neg-modify-local-offer.patch new file mode 100644 index 0000000..c27a489 --- /dev/null +++ b/libs/pjproject/patches/0070-fix-sdp-neg-modify-local-offer.patch @@ -0,0 +1,33 @@ +diff --git a/pjmedia/src/pjmedia/sdp_neg.c b/pjmedia/src/pjmedia/sdp_neg.c +index 3b85b4273..a14009662 100644 +--- a/pjmedia/src/pjmedia/sdp_neg.c ++++ b/pjmedia/src/pjmedia/sdp_neg.c +@@ -304,7 +304,6 @@ PJ_DEF(pj_status_t) pjmedia_sdp_neg_modify_local_offer2( + { + pjmedia_sdp_session *new_offer; + pjmedia_sdp_session *old_offer; +- char media_used[PJMEDIA_MAX_SDP_MEDIA]; + unsigned oi; /* old offer media index */ + pj_status_t status; + +@@ -323,8 +322,19 @@ PJ_DEF(pj_status_t) pjmedia_sdp_neg_modify_local_offer2( + /* Change state to STATE_LOCAL_OFFER */ + neg->state = PJMEDIA_SDP_NEG_STATE_LOCAL_OFFER; + ++ /* When there is no active local SDP in state PJMEDIA_SDP_NEG_STATE_DONE, ++ * it means that the previous initial SDP nego must have been failed, ++ * so we'll just set the local SDP offer here. ++ */ ++ if (!neg->active_local_sdp) { ++ neg->initial_sdp_tmp = NULL; ++ neg->initial_sdp = pjmedia_sdp_session_clone(pool, local); ++ neg->neg_local_sdp = pjmedia_sdp_session_clone(pool, local); ++ ++ return PJ_SUCCESS; ++ } ++ + /* Init vars */ +- pj_bzero(media_used, sizeof(media_used)); + old_offer = neg->active_local_sdp; + new_offer = pjmedia_sdp_session_clone(pool, local); + From 6d6dd129aadba611e8bc603364c4991bc8a9f99d Mon Sep 17 00:00:00 2001 From: Sebastian Kemper Date: Sun, 7 Mar 2021 12:22:45 +0100 Subject: [PATCH 2/2] pjproject: drop autoreconf, run make dep Neither configure.ac nor configure.in exists, so autoreconf is a no-op. This commit drops it. Also, run "make dep" as advertised by the README and the configure script. Signed-off-by: Sebastian Kemper --- libs/pjproject/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libs/pjproject/Makefile b/libs/pjproject/Makefile index 507a96d..879a502 100644 --- a/libs/pjproject/Makefile +++ b/libs/pjproject/Makefile @@ -11,7 +11,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=pjproject PKG_VERSION:=2.10 -PKG_RELEASE:=1 +PKG_RELEASE:=2 # download "vX.Y.tar.gz" as "pjproject-vX.Y.tar.gz" PKG_SOURCE_URL_FILE:=$(PKG_VERSION).tar.gz @@ -19,7 +19,6 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_SOURCE_URL_FILE) PKG_SOURCE_URL:=https://github.com/pjsip/$(PKG_NAME)/archive PKG_HASH:=936a4c5b98601b52325463a397ddf11ab4106c6a7b04f8dc7cdd377efbb597de PKG_INSTALL:=1 -PKG_FIXUP:=autoreconf PKG_LICENSE:=GPL-2.0 PKG_LICENSE_FILES:=COPYING @@ -95,6 +94,7 @@ CONFIGURE_ARGS+= \ TARGET_CFLAGS+=$(TARGET_CPPFLAGS) define Build/Compile + $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) dep $(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR) endef