Re: (*sigh) new gnome-libs problems.

> R Pickett <> writes:
> > Well, after fighting through bad gettext installs and incompatible
> > libpng's, I got gnome-libs-0.99.2 to compile, yay.
> >
> > But it won't install.
> > 
> > Specifically, gnome-gen-mimedb segfaults whenever it's run, so
> > 'make install' 
> > fails about here:

I've been having this problem for the last month or so.

The problem here is the line around line 297 in
gnome-libs/libgnome/gnome-magic.c that says:

  g_snprintf(newent.mimetype, sizeof(newent.mimetype), "%s", curpos);

The problem is that, for some reason, g_snprintf doesn't use the
length argument, so it does the equivalent of sprintf and overruns the
array.  newent.mimetype is only 48 characters, some of the mime types
are longer.

The work around is to change the variable declaration list of
gnome_magic_parse.  Make it read:

	char dummy[50];
	GArray *array;
	GnomeMagicEntry newent *retval;

...then it gets past this problem in the install.

Of course this doesn't _fix_ it.  This just makes it run to

 - Lewis

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]