Created attachment 25730 [details] [review] Don't crash in write_match when magic->matches is NULL. A empty <magic/> element causes update-mime-database to crash, like this example: <mime-type type="video/quicktime"> <comment>QuickTime video</comment> <magic priority="50"> </magic> <glob pattern="*.mov"/> </mime-type> The attached patch fixes that.
This is with shared-mime-info 0.30, forgot to say.
The latest version is 0.60, and it's even newer in CVS. Could you check whether that's still needed?
(In reply to comment #2) > The latest version is 0.60, and it's even newer in CVS. Could you check whether > that's still needed? From reading the code, it is still needed in 0.60 and CVS. (I.e., write_match still access match->magic whithout checking whether it is NULL, but I didn't check whether there is some other change that makes sure write_match never sees a NULL.)
Already fixed as part of bug 28527, along with a test case. *** This bug has been marked as a duplicate of bug 28527 ***
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.