diff --git a/gtk/xdgmime/ChangeLog b/gtk/xdgmime/ChangeLog index 0818220641..9b5b5615f5 100644 --- a/gtk/xdgmime/ChangeLog +++ b/gtk/xdgmime/ChangeLog @@ -1,3 +1,8 @@ +2005-06-10 Federico Mena Quintero + + * xdgmime.c (xdg_mime_init_from_directory): Pass the correct size + to realloc(). Fixes https://bugs.freedesktop.org/show_bug.cgi?id=3506. + 2005-06-09 Matthias Clasen * xdgmimemagic.c: Don't declare errno, including errno.h diff --git a/gtk/xdgmime/xdgmime.c b/gtk/xdgmime/xdgmime.c index 6b400d9ebd..c4bd017adc 100644 --- a/gtk/xdgmime/xdgmime.c +++ b/gtk/xdgmime/xdgmime.c @@ -140,7 +140,7 @@ xdg_mime_init_from_directory (const char *directory) list->next = dir_time_list; dir_time_list = list; - caches = realloc (caches, n_caches + 1); + caches = realloc (caches, sizeof (XdgMimeCache *) * (n_caches + 1)); caches[n_caches] = cache; n_caches++;