From 81a8676d7a109b90691d89b52cde64639a85e8245657b4b9da70ef6260ad2414 Mon Sep 17 00:00:00 2001 From: Andreas Jaeger Date: Tue, 27 Dec 2011 13:04:31 +0000 Subject: [PATCH] Accepting request 98272 from home:namtrac:bugfix - Fix wrong size parameter in memset call OBS-URL: https://build.opensuse.org/request/show/98272 OBS-URL: https://build.opensuse.org/package/show/Base:System/acpid?expand=0&rev=41 --- acpid-wrong-memset.patch | 13 +++++++++++++ acpid.changes | 5 +++++ acpid.spec | 12 +++++++----- 3 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 acpid-wrong-memset.patch diff --git a/acpid-wrong-memset.patch b/acpid-wrong-memset.patch new file mode 100644 index 0000000..4c659e0 --- /dev/null +++ b/acpid-wrong-memset.patch @@ -0,0 +1,13 @@ +Index: acpid-2.0.13/libnetlink.c +=================================================================== +--- acpid-2.0.13.orig/libnetlink.c ++++ acpid-2.0.13/libnetlink.c +@@ -41,7 +41,7 @@ int rtnl_open_byproto(struct rtnl_handle + int sndbuf = 32768; + int rcvbuf = 32768; + +- memset(rth, 0, sizeof(rth)); ++ memset(rth, 0, sizeof(*rth)); + + rth->fd = socket(AF_NETLINK, SOCK_RAW, protocol); + if (rth->fd < 0) { diff --git a/acpid.changes b/acpid.changes index 9b6ab53..2da9764 100644 --- a/acpid.changes +++ b/acpid.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Tue Dec 27 10:55:50 UTC 2011 - idonmez@suse.com + +- Fix wrong size parameter in memset call + ------------------------------------------------------------------- Fri Dec 16 02:03:44 UTC 2011 - crrodriguez@opensuse.org diff --git a/acpid.spec b/acpid.spec index 78d66ee..815749c 100644 --- a/acpid.spec +++ b/acpid.spec @@ -16,15 +16,14 @@ # - Name: acpid Url: http://tedfelix.com/linux/acpid-netlink.html Version: 2.0.13 -Release: 5 -License: GPL-2.0+ -Group: System/Daemons +Release: 0 PreReq: %insserv_prereq %fillup_prereq Summary: Executes Actions at ACPI Events +License: GPL-2.0+ +Group: System/Daemons Source: http://tedfelix.com//linux/%{name}-%{version}.tar.gz Source2: rcacpid Source3: README.SuSE @@ -35,6 +34,7 @@ Source6: thinkpad_handler Source7: power_button Source8: acpid.service Patch1: acpid-makefile.patch +Patch2: acpid-wrong-memset.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: systemd ExclusiveArch: %ix86 x86_64 ia64 @@ -50,7 +50,9 @@ Configure it in /etc/sysconfig/powermanagement. %prep %setup -q -%patch1 -p0 +%patch1 +%patch2 -p1 + cp %{S:2} %{S:3} %{S:4} %{S:5} %{S:6} %{S:7} %{S:9} . %build