mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
GUnixFDMessage: fix a small typo in an extra check
In the deserialise function, GUnixFDMessage was comparing 'level' to both SOL_SOCKET and SCM_RIGHTS. It is correct to compare 'type' to SCM_RIGHTS. The code passed tests only because: 1) it's a "should always be OK" double-check 2) SOL_SOCKET and SCM_RIGHTS, by chance, both have the value '1' on Linux systems.
This commit is contained in:
parent
b00c6d7fb5
commit
baf20e0984
@ -84,7 +84,7 @@ g_unix_fd_message_deserialize (int level,
|
||||
gint *fds;
|
||||
|
||||
if (level != SOL_SOCKET ||
|
||||
level != SCM_RIGHTS)
|
||||
type != SCM_RIGHTS)
|
||||
return NULL;
|
||||
|
||||
if (size % 4 > 0)
|
||||
|
Loading…
Reference in New Issue
Block a user