mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-18 21:11:08 +02:00
fix(sys-apps/systemd): Fix networkd crash
This commit is contained in:
parent
bc686b560b
commit
2bec080d24
@ -0,0 +1,32 @@
|
|||||||
|
From ef1a79119cc9cdeef03af17795e6a05459a0f3af Mon Sep 17 00:00:00 2001
|
||||||
|
From: Steven Siloti <ssiloti@gmail.com>
|
||||||
|
Date: Sun, 30 Mar 2014 21:20:26 -0700
|
||||||
|
Subject: [PATCH] sd-rtnl: fix off-by-one
|
||||||
|
To: systemd-devel@lists.freedesktop.org
|
||||||
|
|
||||||
|
Also fix type parameter passed to new0
|
||||||
|
---
|
||||||
|
src/libsystemd/sd-rtnl/rtnl-message.c | 4 ++--
|
||||||
|
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||||
|
|
||||||
|
diff --git a/src/libsystemd/sd-rtnl/rtnl-message.c b/src/libsystemd/sd-rtnl/rtnl-message.c
|
||||||
|
index 84a8ffa..97ace2a 100644
|
||||||
|
--- a/src/libsystemd/sd-rtnl/rtnl-message.c
|
||||||
|
+++ b/src/libsystemd/sd-rtnl/rtnl-message.c
|
||||||
|
@@ -1073,11 +1073,11 @@ int rtnl_message_parse(sd_rtnl_message *m,
|
||||||
|
unsigned short type;
|
||||||
|
size_t *tb;
|
||||||
|
|
||||||
|
- tb = (size_t *) new0(size_t *, max);
|
||||||
|
+ tb = new0(size_t, max + 1);
|
||||||
|
if(!tb)
|
||||||
|
return -ENOMEM;
|
||||||
|
|
||||||
|
- *rta_tb_size = max;
|
||||||
|
+ *rta_tb_size = max + 1;
|
||||||
|
|
||||||
|
for (; RTA_OK(rta, rt_len); rta = RTA_NEXT(rta, rt_len)) {
|
||||||
|
type = rta->rta_type;
|
||||||
|
--
|
||||||
|
1.9.1
|
||||||
|
|
@ -32,7 +32,7 @@ SRC_URI="http://www.freedesktop.org/software/systemd/${P}.tar.xz"
|
|||||||
|
|
||||||
LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
|
LICENSE="GPL-2 LGPL-2.1 MIT public-domain"
|
||||||
SLOT="0/2"
|
SLOT="0/2"
|
||||||
KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
KEYWORDS="~alpha amd64 ~arm ~ia64 ~ppc ~ppc64 ~sparc ~x86"
|
||||||
IUSE="acl audit cryptsetup doc +firmware-loader gcrypt gudev http introspection
|
IUSE="acl audit cryptsetup doc +firmware-loader gcrypt gudev http introspection
|
||||||
kdbus +kmod lzma pam policykit python qrcode +seccomp selinux ssl
|
kdbus +kmod lzma pam policykit python qrcode +seccomp selinux ssl
|
||||||
test vanilla xattr openrc"
|
test vanilla xattr openrc"
|
||||||
@ -113,6 +113,8 @@ if [[ ${PV} == *9999 ]]; then
|
|||||||
echo 'EXTRA_DIST =' > docs/gtk-doc.make
|
echo 'EXTRA_DIST =' > docs/gtk-doc.make
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
# fix networkd crash, https://bugs.gentoo.org/show_bug.cgi?id=507044
|
||||||
|
epatch "${FILESDIR}"/212-0001-sd-rtnl-fix-off-by-one.patch
|
||||||
|
|
||||||
# CoreOs specific hacks^Wfeatures
|
# CoreOs specific hacks^Wfeatures
|
||||||
epatch "${FILESDIR}"/211-handle-empty-etc-os-release.patch
|
epatch "${FILESDIR}"/211-handle-empty-etc-os-release.patch
|
Loading…
x
Reference in New Issue
Block a user