Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37766845
en ru br
ALT Linux repos
5.0: 1.0.9-alt4.M50.1
4.1: 1.0.9-alt4.M41.1
4.0: 1.0.9-alt4.M40.1
3.0: 1.0.9-alt3

Group :: System/Libraries
RPM: libshout

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: libshout-1.0.9-alt-buffer_overflow.patch
Download


Fix buffer overflow in memcpy function
--- ./sock.c
+++ ./sock.c
@@ -280,7 +276,7 @@ SOCKET sock_connect_wto(const char *hostname, const int port, const int timeout)
 		return INVALID_SOCKET; 
 	}
 
-	memset(&sin, 0, sizeof(sin));
+	memset(&sin, 0, sizeof(struct sockaddr_in));
 	memset(&server, 0, sizeof(struct sockaddr_in));
 
 	if (inet_aton(hostname, (struct in_addr *)&sin.sin_addr) == 0) {
@@ -288,7 +284,7 @@ SOCKET sock_connect_wto(const char *hostname, const int port, const int timeout)
 		return INVALID_SOCKET;
 	}
 
-	memcpy(&server.sin_addr, &sin.sin_addr, sizeof(sin));
+	memcpy(&server.sin_addr, &sin.sin_addr, sizeof(struct in_addr));
 
 	server.sin_family = AF_INET;
 	server.sin_port = htons(port);
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin