]> www.fi.muni.cz Git - evince.git/commitdiff
Don't use more bytes from buffer than were read from the file.
authorChristian Persch <chpe@src.gnome.org>
Sun, 15 Feb 2009 13:51:25 +0000 (13:51 +0000)
committerChristian Persch <chpe@src.gnome.org>
Sun, 15 Feb 2009 13:51:25 +0000 (13:51 +0000)
* 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

ChangeLog
libdocument/ev-file-helpers.c

index b4431e14d83dd1d8a322c76063446dfada9896de..2a9a51208e26061e7b5209716380cfc70446d9ce 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-13  Christian Persch  <chpe@gnome.org>
+
+       * 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  <nshmyrev@yandex.ru>
 
        * properties/ev-properties-view.c (set_property):
index 28f01b10b98abc94fc4e231ed3f65c2b21862a1a..0b82536ceffb2dc0722f6e5525b339319395eeb8 100644 (file)
@@ -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);
 }