[systemd-devel] [PATCH 1/2] socket: prevent signed integer overflow

Dave Reisner dreisner at archlinux.org
Sat Sep 15 09:58:48 PDT 2012


src/core/socket.c:588:25: error: overflow in implicit constant conversion
src/core/socket.c:589:17: error: overflow in implicit constant conversion
---
 src/core/socket.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/socket.c b/src/core/socket.c
index cbbfb0c..f975a43 100644
--- a/src/core/socket.c
+++ b/src/core/socket.c
@@ -584,7 +584,7 @@ static int instance_from_socket(int fd, unsigned nr, char **instance) {
         }
 
         case AF_INET6: {
-                static const char ipv4_prefix[] = {
+                static const unsigned char ipv4_prefix[] = {
                         0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0xFF, 0xFF
                 };
 
-- 
1.7.12



More information about the systemd-devel mailing list