mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-05 18:40:58 +01:00
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 fe7069749fe39a006985ec266260a3c02ee8c855. https://bugzilla.gnome.org/show_bug.cgi?id=709898
512 B
213x256px
512 B
213x256px
![](/luc14n0/glib/raw/commit/bda8b1abe4bc4c029773ed899377986b30e9d512/gio/tests/thumbnails/empty-key.png)