summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorSimon McVittie <smcv@collabora.com>2017-04-14 13:04:13 +0100
committerSimon McVittie <smcv@debian.org>2017-04-18 12:46:20 +0100
commit01019f2bb433c8c12ba4f58e428c3fc506e41632 (patch)
treeea2dd2010f7e5f550269f41c27260e4bdaf028aa /doc
parentef628c3b0afa0b1effdfdf273f8cbacaff969e31 (diff)
downloaddbus-01019f2bb433c8c12ba4f58e428c3fc506e41632.tar.gz
dbus-01019f2bb433c8c12ba4f58e428c3fc506e41632.tar.bz2
dbus-01019f2bb433c8c12ba4f58e428c3fc506e41632.zip
Ensure hyphen/minus is treated as literal in regexes
Each U+002D HYPHEN-MINUS in [0-9A-Za-z_-/.\] is treated as a member of a range. The third one, which appears to have been intended to be a literal, is part of an empty range because the starting point U+005F LOW LINE is greater than the endpoint U+002F SOLIDUS, resulting in at least some grep implementations not considering U+002D, U+002F or U+005F to match the pattern. This resulted in one of the dbus-launch tests being unintentionally skipped when it used a regex based on the one in the spec. regex(7) suggests "To include a literal '-' [in a bracketed character set], make it the first or last character". Signed-off-by: Simon McVittie <smcv@collabora.com> Reviewed-by: Philip Withnall <withnall@endlessm.com> Bug: https://bugs.freedesktop.org/show_bug.cgi?id=100686
Diffstat (limited to 'doc')
-rw-r--r--doc/dbus-specification.xml2
1 files changed, 1 insertions, 1 deletions
diff --git a/doc/dbus-specification.xml b/doc/dbus-specification.xml
index 7110be79..0f0ca5ae 100644
--- a/doc/dbus-specification.xml
+++ b/doc/dbus-specification.xml
@@ -3097,7 +3097,7 @@
<listitem>
<para>
The set of optionally-escaped bytes is:
- <literal>[0-9A-Za-z_-/.\]</literal>. To escape, each
+ <literal>[-0-9A-Za-z_/.\]</literal>. To escape, each
<emphasis>byte</emphasis> (note, not character) which is not in the
set of optionally-escaped bytes must be replaced with an ASCII
percent (<literal>%</literal>) and the value of the byte in hex.