Miroslav Lichvar
2014-05-12 16:35:16 UTC
This was broken in commit e804e6, ifa_addr is a pointer to sockaddr,
it shouldn't be referenced for the memcpy call.
---
sk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sk.c b/sk.c
index 838004e..f694bbd 100644
--- a/sk.c
+++ b/sk.c
@@ -198,7 +198,7 @@ int sk_interface_addr(const char *name, int family, struct address *addr)
default:
continue;
}
- memcpy(&addr->sa, &i->ifa_addr, addr->len);
+ memcpy(&addr->sa, i->ifa_addr, addr->len);
result = 0;
break;
}
it shouldn't be referenced for the memcpy call.
---
sk.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sk.c b/sk.c
index 838004e..f694bbd 100644
--- a/sk.c
+++ b/sk.c
@@ -198,7 +198,7 @@ int sk_interface_addr(const char *name, int family, struct address *addr)
default:
continue;
}
- memcpy(&addr->sa, &i->ifa_addr, addr->len);
+ memcpy(&addr->sa, i->ifa_addr, addr->len);
result = 0;
break;
}
--
1.9.0
1.9.0