mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-28 00:16:15 +01:00
glib: Make sure GLIB_OLD_LOG_API is a NUL-terminated string
Every usage in GLib ensures this but theoretically external code might pass something else. As this is only meant to be used internally from GLib, don't support the other case but at least avoid potential out of bound reads.
This commit is contained in:
parent
f221864d6e
commit
9719853507
@ -2625,6 +2625,7 @@ log_is_old_api (const GLogField *fields,
|
||||
{
|
||||
return (n_fields >= 1 &&
|
||||
g_strcmp0 (fields[0].key, "GLIB_OLD_LOG_API") == 0 &&
|
||||
fields[0].length < 0 &&
|
||||
g_strcmp0 (fields[0].value, "1") == 0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user