mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-24 10:57:53 +02:00
gmenumodel: disallow exporting large menus on the bus
This solves problems with validating untrusted inputs from D-Bus, where invalid numbers of added and removed menu entries, and positions, could be specified. Original patch from https://bugzilla.gnome.org/show_bug.cgi?id=728733#c7, tweaked by Philip Withnall to add a few code comments and make `G_MENU_EXPORTER_MAX_SECTION_SIZE` public so callers can check their inputs against it if they want. Also tweaked to use `g_warning()` instead of the nonexistent `g_dbus_warning()`. Fixes: #861
This commit is contained in:
committed by
Philip Withnall
parent
a0dbaeed2f
commit
89a7bbcf6e
@@ -4328,6 +4328,7 @@ g_power_profile_level_get_type
|
||||
|
||||
<SECTION>
|
||||
<FILE>gmenuexporter</FILE>
|
||||
G_MENU_EXPORTER_MAX_SECTION_SIZE
|
||||
g_dbus_connection_export_menu_model
|
||||
g_dbus_connection_unexport_menu_model
|
||||
</SECTION>
|
||||
|
Reference in New Issue
Block a user