projects
/
platform
/
upstream
/
pulseaudio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
168be38
)
socket-util: allocate at least sizeof(sockaddr_storage) space
author
Lennart Poettering
<lennart@poettering.net>
Fri, 30 Oct 2009 03:54:55 +0000
(
04:54
+0100)
committer
Lennart Poettering
<lennart@poettering.net>
Fri, 30 Oct 2009 03:54:55 +0000
(
04:54
+0100)
src/pulsecore/socket-util.c
patch
|
blob
|
history
diff --git
a/src/pulsecore/socket-util.c
b/src/pulsecore/socket-util.c
index 651779f6a18e57c264a59e3003f440d52d598485..0d0762dc19241c90690ea9c905328cc96f71c1da 100644
(file)
--- a/
src/pulsecore/socket-util.c
+++ b/
src/pulsecore/socket-util.c
@@
-85,12
+85,11
@@
void pa_socket_peer_to_string(int fd, char *c, size_t l) {
#ifndef OS_IS_WIN32
pa_assert_se(fstat(fd, &st) == 0);
-#endif
-#ifndef OS_IS_WIN32
if (S_ISSOCK(st.st_mode)) {
#endif
union {
+ struct sockaddr_storage storage;
struct sockaddr sa;
struct sockaddr_in in;
#ifdef HAVE_IPV6
@@
-315,6
+314,7
@@
pa_bool_t pa_socket_address_is_local(const struct sockaddr *sa) {
pa_bool_t pa_socket_is_local(int fd) {
union {
+ struct sockaddr_storage storage;
struct sockaddr sa;
struct sockaddr_in in;
#ifdef HAVE_IPV6