Reported by gmorten against gtk
xdg_mime_magic_read_from_file needs to check the return value from fread.
Otherwise the memcmp will access memory it should not.
This file has a ton of these too:
xdgmimemagic.c:171: warning: implicit declaration of function `getc_unlocked'