From c42d513ecd0a29550ac510d8041d97722d5a4d4b Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Thu, 13 Mar 2014 16:52:16 +0000 Subject: [PATCH] ortp: fix memset size argument usage As reported by GCC 4.8, the size argument passed to memset() was incorrect. Signed-off-by: Florian Fainelli SVN-Revision: 39923 --- libs/ortp/Makefile | 4 ++-- libs/ortp/patches/001-memset_fix.patch | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 libs/ortp/patches/001-memset_fix.patch diff --git a/libs/ortp/Makefile b/libs/ortp/Makefile index 6ba90311c..801bba097 100644 --- a/libs/ortp/Makefile +++ b/libs/ortp/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2010 OpenWrt.org +# Copyright (C) 2010-2014 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ortp PKG_VERSION:=0.16.3 -PKG_RELEASE:=1 +PKG_RELEASE:=2 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:= \ diff --git a/libs/ortp/patches/001-memset_fix.patch b/libs/ortp/patches/001-memset_fix.patch new file mode 100644 index 000000000..89e2359a0 --- /dev/null +++ b/libs/ortp/patches/001-memset_fix.patch @@ -0,0 +1,11 @@ +--- a/src/stun.c ++++ b/src/stun.c +@@ -399,7 +399,7 @@ stunParseMessage( char* buf, unsigned in + char* body; + unsigned int size; + ortp_debug("stun: Received stun message: %i bytes\n", bufLen); +- memset(msg, 0, sizeof(msg)); ++ memset(msg, 0, sizeof(*msg)); + + if (sizeof(StunMsgHdr) > bufLen) + { -- 2.30.2