Comment # 1 on bug 1185118 from
Created attachment 848632 [details]
[PATCH] Handle missing closing paren in %attr rules

parseForAttr is missing the check for the closing paren.  When a malformed
rule is encountered, the bounds for the end of the rule will be the NUL
terminator for the string.  When it overwrites the rule with spaces,
the entire string, including the NUL terminator, will be overwritten.

Later, in parseForSimple, the string will no longer contain a pathname and
will fail the check for files beginning with /.  Since the string is also
no longer NUL terminated, the error will contain garbage like the following:

error: File must begin with "/": n���L���_;^?

Adding the check for the closing paren fixes the issue.

Fixes: #1648


You are receiving this mail because: