From: Christian Persch Date: Sun, 15 Feb 2009 13:51:25 +0000 (+0000) Subject: Don't use more bytes from buffer than were read from the file. X-Git-Tag: EVINCE_2_25_91~43 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=6d536b8815d57852153f260e9985f6d98effd9d1;p=evince.git Don't use more bytes from buffer than were read from the file. * libdocument/ev-file-helpers.c: (get_mime_type_from_data): Don't use more bytes from buffer than were read from the file. svn path=/trunk/; revision=3437 --- diff --git a/ChangeLog b/ChangeLog index b4431e14..2a9a5120 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-02-13 Christian Persch + + * libdocument/ev-file-helpers.c: (get_mime_type_from_data): Don't use + more bytes from buffer than were read from the file. + 2009-02-15 Nickolay V. Shmyrev * properties/ev-properties-view.c (set_property): diff --git a/libdocument/ev-file-helpers.c b/libdocument/ev-file-helpers.c index 28f01b10..0b82536c 100644 --- a/libdocument/ev-file-helpers.c +++ b/libdocument/ev-file-helpers.c @@ -258,7 +258,7 @@ get_mime_type_from_data (const gchar *uri, GError **error) return NULL; return g_content_type_guess (NULL, /* no filename */ - buffer, 1024, + buffer, size_read, NULL); }