tests: Add tests for the thumbnail verification code in GIO

This code was added for use by the G_FILE_ATTRIBUTE_THUMBNAIL_IS_VALID
file attribute, but may end up being used elsewhere (e.g. in GVfs) as well.
As it’s dealing with untrusted external files, and the non-trivial PNG file
format, this commit adds several test cases to cover valid and invalid PNG
files.

The security model for the thumbnail verification code is that the user’s
cache directory is untrusted, and potentially any PNG file which is passed
to the verifier has been manipulated arbitrarily by an attacker.

This is a follow-up to commit fe7069749f.

https://bugzilla.gnome.org/show_bug.cgi?id=709898
This commit is contained in:
Philip Withnall
2013-10-24 12:09:27 +01:00
committed by Ryan Lortie
parent ed6ca39d3b
commit fcd2f7e639
14 changed files with 141 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 256 B