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

(cherry picked from commit a149bf2f90)
This commit is contained in:
Jan Alexander Steffens (heftig)
2021-02-07 23:32:40 +01:00
committed by Simon McVittie
parent d5ec4f360f
commit f8273b9ade

View File

@@ -900,7 +900,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;
}