summaryrefslogtreecommitdiffstats
path: root/bus
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2003-10-10 03:56:30 +0000
committerHavoc Pennington <hp@redhat.com>2003-10-10 03:56:30 +0000
commitc1f0e189030ceb2bafea0bc30d6b72a0fa381ddc (patch)
tree7eb6d2c7a43003f9d1193b5d6c73b4a565502e20 /bus
parent6a65f4802e95ba442c520f8e225da837e0a9f73b (diff)
2003-10-09 Havoc Pennington <hp@redhat.com>
* configure.in: define DBUS_HAVE_GCC33_GCOV if we have gcc 3.3. Not that we do anything about it yet. * bus/signals.c (bus_match_rule_parse): impose max length on the match rule text * dbus/dbus-protocol.h: add DBUS_MAXIMUM_MATCH_RULE_LENGTH
Diffstat (limited to 'bus')
-rw-r--r--bus/signals.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/bus/signals.c b/bus/signals.c
index 960d846c..0fd4b514 100644
--- a/bus/signals.c
+++ b/bus/signals.c
@@ -586,6 +586,15 @@ bus_match_rule_parse (DBusConnection *matches_go_to,
int i;
_DBUS_ASSERT_ERROR_IS_CLEAR (error);
+
+ if (_dbus_string_get_length (rule_text) > DBUS_MAXIMUM_MATCH_RULE_LENGTH)
+ {
+ dbus_set_error (error, DBUS_ERROR_LIMITS_EXCEEDED,
+ "Match rule text is %d bytes, maximum is %d",
+ _dbus_string_get_length (rule_text),
+ DBUS_MAXIMUM_MATCH_RULE_LENGTH);
+ return NULL;
+ }
memset (tokens, '\0', sizeof (tokens));