[Rpm-maint] [rpm-software-management/rpm] %attr rule with missing closing paren causes inscrutable error messages (#1648)

Jeff Mahoney notifications at github.com
Wed Apr 21 20:31:59 UTC 2021


When a malformed rule such as:

%dir %attr(-,root,root /path/to/file

is encountered, rpmbuild fails with an error message like:

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

This is due to the check for the closing paren as found in other rule handlers is missing. When the rule is overwritten by spaces, parseForAttr assumes that the final character is the closing paren and will overwrite the entire string including the NUL terminator. Later, since the entire string is spaces and also not NUL terminated, the error message will include whatever garbage happens to be after the end of the string.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/issues/1648
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20210421/18c06e2a/attachment.html>


More information about the Rpm-maint mailing list