mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
socket-util: allocate at least sizeof(sockaddr_storage) space
This commit is contained in:
parent
168be3830a
commit
75f7a971db
1 changed files with 2 additions and 2 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue