- fix iproute2-2.6.25-segfault.patch

This commit is contained in:
Marcela Mašláňová 2008-07-22 10:23:22 +00:00
parent f0f830762c
commit c1edd78001
2 changed files with 27 additions and 3 deletions

View File

@ -4,7 +4,7 @@
Summary: Advanced IP routing and network device configuration tools
Name: iproute
Version: 2.6.25
Release: 4%{?dist}
Release: 5%{?dist}
Group: Applications/System
Source: http://developer.osdl.org/dev/iproute2/download/iproute2-%{version}.tar.bz2
#Source1: iproute-doc-2.6.22.tar.gz
@ -16,7 +16,7 @@ Patch4: iproute-ip-man.patch
Patch5: iproute2-movelib.patch
Patch6: iproute2-tex.patch
Patch7: iproute2-2.6.25-aead.patch
Patch8: iproute2-2.6.25-xfrmsegfault.patch
Patch8: iproute2-2.6.25-segfault.patch
License: GPLv2+
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -114,11 +114,14 @@ EOF
%config(noreplace) %{_sysconfdir}/sysconfig/cbq/*
%changelog
* Tue Jul 22 2008 Marcela Maslanova <mmaslano@redhat.com> - 2.6.25-5
- fix iproute2-2.6.25-segfault.patch
* Thu Jul 10 2008 Tom "spot" Callaway <tcallawa@redhat.com> - 2.6.25-4
- rebuild for new db4-4.7
* Thu Jul 3 2008 Marcela Maslanova <mmaslano@redhat.com> - 2.6.25-3
- 449933 fix segfault after non-existent combination of commands
- 449933 instead of failing strncpy use copying byte after byte
* Wed May 14 2008 Marcela Maslanova <mmaslano@redhat.com> - 2.6.25-2
- allow replay setting, solve also 444724

View File

@ -0,0 +1,21 @@
diff -up iproute-2.6.25/iproute2-2.6.25/ip/xfrm_state.c.seg iproute-2.6.25/iproute2-2.6.25/ip/xfrm_state.c
--- iproute-2.6.25/iproute2-2.6.25/ip/xfrm_state.c.seg 2008-07-21 17:23:12.000000000 +0200
+++ iproute-2.6.25/iproute2-2.6.25/ip/xfrm_state.c 2008-07-22 09:27:12.000000000 +0200
@@ -158,12 +158,16 @@ static int xfrm_algo_parse(struct xfrm_a
buf[j] = val;
}
} else {
+ int i;
len = slen;
if (len > 0) {
if (len > max)
invarg("\"ALGOKEY\" makes buffer overflow\n", key);
- strncpy(buf, key, len);
+ for (i = 0 ; i < len && key[i] != '\0'; i++)
+ buf[i] = key[i];
+ for ( ; i < len; i++)
+ buf[i] = '\0';
}
}