mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
gtlspassword: Fix inverted assertion
The intention here was to assert that the length of the password fits
in a gssize. Passwords more than half the size of virtual memory are
probably excessive.
Fixes: a8b204ff
"gtlspassword: Forbid very long TLS passwords"
Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
fa248f7f71
commit
61bb52ec42
@ -290,7 +290,7 @@ g_tls_password_set_value (GTlsPassword *password,
|
||||
{
|
||||
/* FIXME: g_tls_password_set_value_full() doesn’t support unsigned gsize */
|
||||
gsize length_unsigned = strlen ((gchar *) value);
|
||||
g_return_if_fail (length_unsigned > G_MAXSSIZE);
|
||||
g_return_if_fail (length_unsigned <= G_MAXSSIZE);
|
||||
length = (gssize) length_unsigned;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user