mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-01 15:03:39 +02: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.
(cherry picked from commit baf20e0984
)
This commit is contained in:
committed by
Matthias Clasen
parent
aecd2616c7
commit
40005647ed
@@ -81,7 +81,7 @@ g_unix_fd_message_deserialize (int level,
|
||||
GUnixFDMessage *message;
|
||||
|
||||
if (level != SOL_SOCKET ||
|
||||
level != SCM_RIGHTS)
|
||||
type != SCM_RIGHTS)
|
||||
return NULL;
|
||||
|
||||
if (size % 4 > 0)
|
||||
|
Reference in New Issue
Block a user