GNOME Bugzilla – Bug 772246
AutoarExtractor: check encrypted entry after header is read
Last modified: 2017-01-08 18:10:53 UTC
See patch.
Created attachment 336629 [details] [review] AutoarExtractor: check encrypted entry after header is read If an archive has an encrypted header, libarchive will return a fatal error code when attempting to read it. This is a problem because it will skip the verification for encrypted entries. In order to fix this, check if entries are encrypted outside of the header reading loop.
*** Bug 771801 has been marked as a duplicate of this bug. ***
Review of attachment 336629 [details] [review]: I cannot see the difference on this patch vs the previous code, you break and return in case it is encrypted. How does it differs? I believe I'm missing something.
(In reply to Carlos Soriano from comment #3) > Review of attachment 336629 [details] [review] [review]: > > I cannot see the difference on this patch vs the previous code, you break > and return in case it is encrypted. How does it differs? I believe I'm > missing something. If the entire header is encrypted, the 'while' condition will be false right from the start. That's why I have to check the entry outside, to also cover this case.
Review of attachment 336629 [details] [review]: This patch looks correct. You can commit it after deleting the indent-fixing hunk. ::: gnome-autoar/autoar-extractor.c @@ +1622,3 @@ + "\'%s\': %s", + self->source_basename, + "empty archive"); If you want to fix the indent problem, please do it in a separate commit. It will be better if you can include the above 'not an archive' g_error_new call in that commit.
I modified your patch and committed it as a7ff65c.