commit:     0b00ff1312e734ae453a9f61f504bdc400b2b2df
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 20 14:48:24 2021 +0000
Commit:     Ulrich Müller <ulm <AT> gentoo <DOT> org>
CommitDate: Mon Mar 29 20:41:37 2021 +0000
URL:        https://gitweb.gentoo.org/proj/devmanual.git/commit/?id=0b00ff13

tools-reference/sed: emphasise need for delimiter care

Bug: https://bugs.gentoo.org/685160
Signed-off-by: Sam James <sam <AT> gentoo.org>
Signed-off-by: Ulrich Müller <ulm <AT> gentoo.org>

 tools-reference/sed/text.xml | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools-reference/sed/text.xml b/tools-reference/sed/text.xml
index b971946..f116eac 100644
--- a/tools-reference/sed/text.xml
+++ b/tools-reference/sed/text.xml
@@ -132,7 +132,12 @@ The above will replace <c>irksome texting</c> with
 <p>
 If the pattern or the replacement string contains the forward slash character,
 it is usually easiest to use a different delimiter. Most punctuation characters
-are allowed, although backslash and any form of brackets should be avoided.
+are allowed, although backslash and any form of brackets should be avoided. You
+should choose your delimiter <b>with care</b> to ensure it cannot appear in any
+strings involved in the subject/replacement. For example, using <c>sed</c> with
+CFLAGS is hazardous because it is user-supplied data (so may contain any
+character), but one should in particular avoid e.g.
+<uri link="https://bugs.gentoo.org/685160";>the colon</uri> here.
 </p>
 
 <codesample lang="ebuild">

Reply via email to