diff options
Diffstat (limited to 'main/cups/cups-check-sockaddr-size.patch')
-rw-r--r-- | main/cups/cups-check-sockaddr-size.patch | 45 |
1 files changed, 0 insertions, 45 deletions
diff --git a/main/cups/cups-check-sockaddr-size.patch b/main/cups/cups-check-sockaddr-size.patch deleted file mode 100644 index ce966dc970..0000000000 --- a/main/cups/cups-check-sockaddr-size.patch +++ /dev/null @@ -1,45 +0,0 @@ -diff --git a/backend/lpd.c b/backend/lpd.c -index 6e4ab36..bbffb82 100644 ---- a/backend/lpd.c -+++ b/backend/lpd.c -@@ -1244,6 +1244,7 @@ rresvport_af(int *port, /* IO - Port number to bind to */ - { - http_addr_t addr; /* Socket address */ - int fd; /* Socket file descriptor */ -+ socklen_t socksz=sizeof(struct sockaddr); /* size of struct sockaddr* */ - - - /* -@@ -1260,6 +1261,23 @@ rresvport_af(int *port, /* IO - Port number to bind to */ - memset(&addr, 0, sizeof(addr)); - addr.addr.sa_family = family; - -+ switch(family) { -+ case AF_INET: -+ socksz = sizeof(struct sockaddr_in); -+ break; -+#ifdef AF_INET6 -+ case AF_INET6: -+ socksz = sizeof(struct sockaddr_in6); -+ break; -+#endif -+#ifdef AF_LOCAL -+ case AF_LOCAL: -+ socksz = sizeof(struct sockaddr_un); -+#endif -+ default: -+ break; -+ } -+ - /* - * Try to bind the socket to a reserved port... - */ -@@ -1276,7 +1294,7 @@ rresvport_af(int *port, /* IO - Port number to bind to */ - * Try binding the port to the socket; return if all is OK... - */ - -- if (!bind(fd, (struct sockaddr *)&addr, sizeof(addr))) -+ if (!bind(fd, (struct sockaddr *)&addr, socksz)) - return (fd); - - /* |