diff options
author | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-09-12 22:48:46 +0000 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@gentoo.org> | 2010-09-12 22:48:46 +0000 |
commit | e6a67d4113e310b070e8cb5c74ec2dd6e3cb039a (patch) | |
tree | f1a040fe8407fe44f2bd246814b0ba760c029147 /net-libs/libtirpc | |
parent | Copy KDE 4.5.1 mask from base/package.mask to override unmasking in arch/* (diff) | |
download | gentoo-2-e6a67d4113e310b070e8cb5c74ec2dd6e3cb039a.tar.gz gentoo-2-e6a67d4113e310b070e8cb5c74ec2dd6e3cb039a.tar.bz2 gentoo-2-e6a67d4113e310b070e8cb5c74ec2dd6e3cb039a.zip |
Use an even better patch to avoid overflow on the other senses if hp_length is less than four.
(Portage version: 2.2_rc80/cvs/Linux x86_64)
Diffstat (limited to 'net-libs/libtirpc')
-rw-r--r-- | net-libs/libtirpc/ChangeLog | 7 | ||||
-rw-r--r-- | net-libs/libtirpc/files/libtirpc-0.2.1-fortify.patch | 9 |
2 files changed, 12 insertions, 4 deletions
diff --git a/net-libs/libtirpc/ChangeLog b/net-libs/libtirpc/ChangeLog index ccf4becb771d..e08a60a64574 100644 --- a/net-libs/libtirpc/ChangeLog +++ b/net-libs/libtirpc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for net-libs/libtirpc # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-libs/libtirpc/ChangeLog,v 1.10 2010/09/12 21:41:47 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-libs/libtirpc/ChangeLog,v 1.11 2010/09/12 22:48:46 flameeyes Exp $ + + 12 Sep 2010; Diego E. Pettenò <flameeyes@gentoo.org> + files/libtirpc-0.2.1-fortify.patch: + Use an even better patch to avoid overflow on the other senses if + hp_length is less than four. *libtirpc-0.2.1-r1 (12 Sep 2010) diff --git a/net-libs/libtirpc/files/libtirpc-0.2.1-fortify.patch b/net-libs/libtirpc/files/libtirpc-0.2.1-fortify.patch index 39abfdd3c062..7375bf83e41d 100644 --- a/net-libs/libtirpc/files/libtirpc-0.2.1-fortify.patch +++ b/net-libs/libtirpc/files/libtirpc-0.2.1-fortify.patch @@ -2,14 +2,17 @@ Index: libtirpc-0.2.1/src/getrpcport.c =================================================================== --- libtirpc-0.2.1.orig/src/getrpcport.c +++ libtirpc-0.2.1/src/getrpcport.c -@@ -57,8 +57,8 @@ getrpcport(host, prognum, versnum, proto +@@ -54,11 +54,11 @@ getrpcport(host, prognum, versnum, proto + + if ((hp = gethostbyname(host)) == NULL) + return (0); ++ if (hp->h_length != sizeof(addr.sin_addr.s_addr)) ++ return (0); memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = 0; - if (hp->h_length > sizeof(addr)) - hp->h_length = sizeof(addr); -+ if (hp->h_length > sizeof(addr.sin_addr.s_addr)) -+ hp->h_length = sizeof(addr.sin_addr.s_addr); memcpy(&addr.sin_addr.s_addr, hp->h_addr, (size_t)hp->h_length); /* Inconsistent interfaces need casts! :-( */ return (pmap_getport(&addr, (u_long)prognum, (u_long)versnum, |