SecBSD's official ports repository
This commit is contained in:
commit
2c0afcbbf3
64331 changed files with 5339189 additions and 0 deletions
|
@ -0,0 +1,20 @@
|
|||
Fix segfault during 'scanimage -L' if e.g. a "pflog0" interface exists.
|
||||
Address family AF_LINK is not expected by prepare_socket() and sa_size().
|
||||
Crashes during memcpy( &local_sa_copy, local_sa, sa_size(local_sa) );
|
||||
because sa_size() returns a fallback value that doesn't match the actual size.
|
||||
|
||||
Index: backend/pixma/pixma_bjnp.c
|
||||
--- backend/pixma/pixma_bjnp.c.orig
|
||||
+++ backend/pixma/pixma_bjnp.c
|
||||
@@ -2115,6 +2115,11 @@ sanei_bjnp_find_devices (const char **conf_devices,
|
||||
while ((no_sockets < BJNP_SOCK_MAX) && (interface != NULL))
|
||||
{
|
||||
if ( ! (interface -> ifa_flags & IFF_POINTOPOINT) &&
|
||||
+ ( interface -> ifa_addr -> sa_family == AF_INET
|
||||
+#ifdef ENABLE_IPV6
|
||||
+ || interface -> ifa_addr -> sa_family == AF_INET6
|
||||
+#endif
|
||||
+ ) &&
|
||||
( (socket_fd[no_sockets] =
|
||||
prepare_socket( interface -> ifa_name,
|
||||
(bjnp_sockaddr_t *) interface -> ifa_addr,
|
Loading…
Add table
Add a link
Reference in a new issue