After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 149189 - _xdg_mime_magic_read_from_file
_xdg_mime_magic_read_from_file
Status: RESOLVED NOTGNOME
Product: gtk+
Classification: Platform
Component: Widget: Other
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2004-08-03 17:44 UTC by Morten Welinder
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Morten Welinder 2004-08-03 17:44:36 UTC
_xdg_mime_magic_read_from_file needs to check the return value from fread.
Otherwise the memcmp will access memory it should not.
Comment 1 Morten Welinder 2004-08-03 18:05:56 UTC
This file has a ton of these too:

xdgmimemagic.c:171: warning: implicit declaration of function `getc_unlocked'
Comment 2 Matthias Clasen 2004-08-11 23:30:12 UTC
Filed upstream as 

http://freedesktop.org/bugzilla/show_bug.cgi?id=1049