* [gentoo-commits] gentoo-x86 commit in dev-libs/ucommon/files: ucommon-5.2.2-address.patch
@ 2012-08-19 21:22 Alexander Vershilov (qnikst)
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Vershilov (qnikst) @ 2012-08-19 21:22 UTC (permalink / raw
To: gentoo-commits
qnikst 12/08/19 21:22:43
Added: ucommon-5.2.2-address.patch
Log:
ucommon-5.2.2 bug#423941 fixed
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Revision Changes Path
1.1 dev-libs/ucommon/files/ucommon-5.2.2-address.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/ucommon/files/ucommon-5.2.2-address.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/ucommon/files/ucommon-5.2.2-address.patch?rev=1.1&content-type=text/plain
Index: ucommon-5.2.2-address.patch
===================================================================
This patch fixes fortify source
Author: David Sugar <dyfet@gnutelephony.org>
--- /commoncpp/address.cpp
+++ /commoncpp/address.cpp
@@ -360,7 +360,7 @@ void IPV4Address::setAddress(const char *host)
if(ipaddr)
delete[] ipaddr;
ipaddr = new struct in_addr[1];
- memset((void *)&ipaddr[0], 0, sizeof(ipaddr));
+ memset((void *)&ipaddr[0], 0, sizeof(struct in_addr));
return;
}
@@ -498,7 +498,7 @@ IPV6Address::IPV6Address(const IPV6Validator
*_validator)
: validator(_validator), hostname(NULL) {
addr_count = 1;
ipaddr = new struct in6_addr[1];
- memcpy(ipaddr, &in6addr_any, sizeof(in6_addr));
+ memcpy(ipaddr, &in6addr_any, sizeof(struct in6_addr));
}
IPV6Address::IPV6Address(const char *address, const IPV6Validator
*_validator) :
@@ -716,7 +716,7 @@ void IPV6Address::setAddress(const char *host)
if(ipaddr)
delete[] ipaddr;
ipaddr = new struct in6_addr[1];
- memset((void *)&ipaddr[0], 0, sizeof(ipaddr));
+ memset((void *)&ipaddr[0], 0, sizeof(struct in6_addr));
return;
}
@@ -796,7 +796,7 @@ void IPV6Address::setAddress(const char *host)
if(ipaddr)
delete[] ipaddr;
ipaddr = new struct in6_addr[1];
- memset((void *)&ipaddr[0], 0, sizeof(ipaddr));
+ memset((void *)&ipaddr[0], 0, sizeof(struct in6_addr));
return;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* [gentoo-commits] gentoo-x86 commit in dev-libs/ucommon/files: ucommon-5.2.2-address.patch
@ 2012-08-20 6:32 Alexander Vershilov (qnikst)
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Vershilov (qnikst) @ 2012-08-20 6:32 UTC (permalink / raw
To: gentoo-commits
qnikst 12/08/20 06:32:07
Modified: ucommon-5.2.2-address.patch
Log:
ucommon-5.2.2 patch fixed
(Portage version: 2.2.0_alpha120/cvs/Linux x86_64)
Revision Changes Path
1.2 dev-libs/ucommon/files/ucommon-5.2.2-address.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/ucommon/files/ucommon-5.2.2-address.patch?rev=1.2&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/ucommon/files/ucommon-5.2.2-address.patch?rev=1.2&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/dev-libs/ucommon/files/ucommon-5.2.2-address.patch?r1=1.1&r2=1.2
Index: ucommon-5.2.2-address.patch
===================================================================
RCS file: /var/cvsroot/gentoo-x86/dev-libs/ucommon/files/ucommon-5.2.2-address.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ucommon-5.2.2-address.patch 19 Aug 2012 21:22:43 -0000 1.1
+++ ucommon-5.2.2-address.patch 20 Aug 2012 06:32:07 -0000 1.2
@@ -1,9 +1,10 @@
-This patch fixes fortify source
+This patch fixes memory errors
-Author: David Sugar <dyfet@gnutelephony.org>
---- /commoncpp/address.cpp
-+++ /commoncpp/address.cpp
-@@ -360,7 +360,7 @@ void IPV4Address::setAddress(const char *host)
+Author: David Sugar
+
+--- commoncpp/address.cpp
++++ commoncpp/address.cpp
+@@ -360,7 +360,7 @@
if(ipaddr)
delete[] ipaddr;
ipaddr = new struct in_addr[1];
@@ -11,19 +12,17 @@
+ memset((void *)&ipaddr[0], 0, sizeof(struct in_addr));
return;
}
-
-@@ -498,7 +498,7 @@ IPV6Address::IPV6Address(const IPV6Validator
-*_validator)
+
+@@ -498,7 +498,7 @@
: validator(_validator), hostname(NULL) {
addr_count = 1;
ipaddr = new struct in6_addr[1];
- memcpy(ipaddr, &in6addr_any, sizeof(in6_addr));
+ memcpy(ipaddr, &in6addr_any, sizeof(struct in6_addr));
}
-
- IPV6Address::IPV6Address(const char *address, const IPV6Validator
-*_validator) :
-@@ -716,7 +716,7 @@ void IPV6Address::setAddress(const char *host)
+
+ IPV6Address::IPV6Address(const char *address, const IPV6Validator *_validator) :
+@@ -716,7 +716,7 @@
if(ipaddr)
delete[] ipaddr;
ipaddr = new struct in6_addr[1];
@@ -31,8 +30,8 @@
+ memset((void *)&ipaddr[0], 0, sizeof(struct in6_addr));
return;
}
-
-@@ -796,7 +796,7 @@ void IPV6Address::setAddress(const char *host)
+
+@@ -796,7 +796,7 @@
if(ipaddr)
delete[] ipaddr;
ipaddr = new struct in6_addr[1];
@@ -40,3 +39,4 @@
+ memset((void *)&ipaddr[0], 0, sizeof(struct in6_addr));
return;
}
+
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-08-20 6:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-19 21:22 [gentoo-commits] gentoo-x86 commit in dev-libs/ucommon/files: ucommon-5.2.2-address.patch Alexander Vershilov (qnikst)
-- strict thread matches above, loose matches on Subject: below --
2012-08-20 6:32 Alexander Vershilov (qnikst)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox