gdbusmessage: Fix check on upper limit of message size

There was a typo in the figure checked against. Add a unit test.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://gitlab.gnome.org/GNOME/glib/issues/1642
This commit is contained in:
Philip Withnall
2019-01-28 14:36:42 +00:00
parent 79d5e1432d
commit 31b0ba18c1
2 changed files with 72 additions and 2 deletions

View File

@@ -1984,7 +1984,7 @@ g_dbus_message_bytes_needed (guchar *blob,
"Unable to determine message blob length - given blob is malformed");
}
if (ret > (2<<27))
if (ret > (1<<27))
{
g_set_error (error,
G_IO_ERROR,