rpms/net-snmp/F-7 net-snmp-5.4-udp-leak.patch,NONE,1.1
Jan Šafránek (jsafrane)
fedora-extras-commits at redhat.com
Mon Oct 22 11:31:36 UTC 2007
- Previous message (by thread): rpms/thttpd/devel index.html, 1.3, 1.4 sources, 1.3, 1.4 thttpd.spec, 1.14, 1.15 powered_by_fedora.png, 1.1, NONE
- Next message (by thread): rpms/thttpd/F-8 sources, 1.3, 1.4 thttpd.spec, 1.14, 1.15 powered_by_fedora.png, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: jsafrane
Update of /cvs/pkgs/rpms/net-snmp/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv28667
Added Files:
net-snmp-5.4-udp-leak.patch
Log Message:
fix leak in UDP transport
Resolves: #247771
net-snmp-5.4-udp-leak.patch:
--- NEW FILE net-snmp-5.4-udp-leak.patch ---
Author: upstream, svn diff -r 15682:15683
Reviewed-By: Jan Safranek <jsafrane at redhat.com>
Index: snmplib/snmpUDPDomain.c
===================================================================
--- snmplib/snmpUDPDomain.c (revision 15682)
+++ snmplib/snmpUDPDomain.c (revision 15683)
@@ -586,28 +586,24 @@
int rc = 0;
char *str = NULL;
char *client_socket = NULL;
- netsnmp_udp_addr_pair *addr_pair = NULL;
+ netsnmp_udp_addr_pair addr_pair;
if (addr == NULL || addr->sin_family != AF_INET) {
return NULL;
}
- addr_pair = (netsnmp_udp_addr_pair *) malloc(sizeof(netsnmp_udp_addr_pair));
- if (addr_pair == NULL) {
- return NULL;
- }
- memset(addr_pair, 0, sizeof(netsnmp_udp_addr_pair));
- memcpy(&(addr_pair->remote_addr), addr, sizeof(struct sockaddr_in));
+ memset(&addr_pair, 0, sizeof(netsnmp_udp_addr_pair));
+ memcpy(&(addr_pair.remote_addr), addr, sizeof(struct sockaddr_in));
t = (netsnmp_transport *) malloc(sizeof(netsnmp_transport));
if (t == NULL) {
return NULL;
}
- str = netsnmp_udp_fmtaddr(NULL, (void *)addr_pair,
+ str = netsnmp_udp_fmtaddr(NULL, (void *)&addr_pair,
sizeof(netsnmp_udp_addr_pair));
- DEBUGMSGTL(("netsnmp_udp", "open %s %s:%d\n", local ? "local" : "remote",
- str,addr->sin_port));
+ DEBUGMSGTL(("netsnmp_udp", "open %s %s\n", local ? "local" : "remote",
+ str));
free(str);
memset(t, 0, sizeof(netsnmp_transport));
@@ -690,7 +686,7 @@
t->remote[4] = (htons(addr->sin_port) & 0xff00) >> 8;
t->remote[5] = (htons(addr->sin_port) & 0x00ff) >> 0;
t->remote_length = 6;
- memcpy(t->data, addr_pair, sizeof(netsnmp_udp_addr_pair));
+ memcpy(t->data, &addr_pair, sizeof(netsnmp_udp_addr_pair));
t->data_length = sizeof(netsnmp_udp_addr_pair);
}
- Previous message (by thread): rpms/thttpd/devel index.html, 1.3, 1.4 sources, 1.3, 1.4 thttpd.spec, 1.14, 1.15 powered_by_fedora.png, 1.1, NONE
- Next message (by thread): rpms/thttpd/F-8 sources, 1.3, 1.4 thttpd.spec, 1.14, 1.15 powered_by_fedora.png, 1.1, NONE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list