giochannel: Fix length_size bounds check

The inverted condition is an obvious error introduced by ecdf91400e.

Fixes https://gitlab.gnome.org/GNOME/glib/-/issues/2323
This commit is contained in:
Jan Alexander Steffens (heftig) 2021-02-07 23:32:40 +01:00
parent fa248f7f71
commit a149bf2f90
No known key found for this signature in database
GPG Key ID: 3B94A80E50A477C7

View File

@ -899,7 +899,7 @@ g_io_channel_set_line_term (GIOChannel *channel,
{
/* FIXME: Were constrained by line_term_len being a guint here */
gsize length_size = strlen (line_term);
g_return_if_fail (length_size > G_MAXUINT);
g_return_if_fail (length_size <= G_MAXUINT);
length_unsigned = (guint) length_size;
}