From fbfaae3a23e1d06653ded5a9b20f8f18612ed95c Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sat, 8 Nov 2014 11:02:25 -0500 Subject: [PATCH] Detect malformed comments rather than byte-stuffing. --- src | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src b/src index f529d5c..c56df66 100755 --- a/src +++ b/src @@ -445,7 +445,8 @@ def commit_method(*args): commentfile = "/tmp/src%dtmp" % os.getpid() do_or_die(editor + " " + commentfile, loud=True) comment = open(commentfile).read() - if metadata.delimiter in comment: + # Delimiter won't be set just after add + if metadata.delimiter and metadata.delimiter in comment: croak("malformed comment") if not comment.endswith("\n"): comment += "\n" -- 2.43.0