undelfs warnings fix

Andrew V. Samoilov andrew at email.zp.ua
Fri Nov 14 15:37:50 UTC 2003


> > On Thu, 13 Nov 2003, Andrew V. Samoilov wrote:
> > 
> > > Hello, Pavel!
> > >
> > > Small fix for last changes.
> > 
> > The warnings have been fixed already.  I'm not sure about com_err().  See
> > "man com_err".  Maybe it's used to override com_err() from the library.
> 
> It seems you are right about com_err().  Well, this patch cleans up argument
> names for com_err() and also fixes program termination if where is no enough
> memory while scanning deleted entries.
> 
> As far as I remember there was some problems with g_malloc() & free() mixing,
> at least on FreeBSD, so I propose to define free as g_free() for glib2+,
> and use free() to release memory, allocated by malloc()/realloc() for 
> glib 1.2.x.  I fix this for undelfs, but view->data case in view.c is more
> complicated.

Previous patch implementation breaks mcfs compilation, and as I understood
recently current implementaion of com_err() is wrong and have format string
vulnerability.

New implementation fixes com_err() and does not define free, sorry about
glib and libc memory allocation function mix, but we have it for glib 1.2x.
already.

-- 
Regards,
Andrew V. Samoilov.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: undelfs.c.patch
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20031114/27a5175e/attachment.ksh>


More information about the mc-devel mailing list