From 296337f025d87523375952c730682c3c0adf1b97 Mon Sep 17 00:00:00 2001 From: Florian Fainelli Date: Wed, 12 Mar 2014 21:32:58 +0000 Subject: [PATCH] mini_snmpd: fix the size argument to memset (#13764) Building with gcc-4.8 spotted this memset size argument misuse, fix this. Signed-off-by: Florian Fainelli SVN-Revision: 39901 --- net/mini_snmpd/Makefile | 4 ++-- net/mini_snmpd/patches/104-memset_fix.patch | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 net/mini_snmpd/patches/104-memset_fix.patch diff --git a/net/mini_snmpd/Makefile b/net/mini_snmpd/Makefile index b97d2ade6..e4a77b595 100644 --- a/net/mini_snmpd/Makefile +++ b/net/mini_snmpd/Makefile @@ -1,5 +1,5 @@ # -# Copyright (C) 2009-2012 OpenWrt.org +# Copyright (C) 2009-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:=mini_snmpd PKG_VERSION:=1.2b -PKG_RELEASE:=7 +PKG_RELEASE:=8 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://members.aon.at/linuxfreak/linux/ diff --git a/net/mini_snmpd/patches/104-memset_fix.patch b/net/mini_snmpd/patches/104-memset_fix.patch new file mode 100644 index 000000000..0ed2a2e3c --- /dev/null +++ b/net/mini_snmpd/patches/104-memset_fix.patch @@ -0,0 +1,11 @@ +--- a/mini_snmpd.c ++++ b/mini_snmpd.c +@@ -443,7 +443,7 @@ int main(int argc, char *argv[]) + /* Store the starting time since we need it for MIB updates */ + if (gettimeofday(&tv_last, NULL) == -1) { + memset(&tv_last, 0, sizeof (tv_last)); +- memset(&tv_sleep, 0, sizeof (&tv_sleep)); ++ memset(&tv_sleep, 0, sizeof (tv_sleep)); + } else { + tv_sleep.tv_sec = g_timeout / 100; + tv_sleep.tv_usec = (g_timeout % 100) * 10000; -- 2.30.2