* Pavel Roskin ([EMAIL PROTECTED]) [20030226 19:08]:

> I've applied a much simple patch for this:
> 
> /* Make sure view->s.st_size is not truncated when passed to g_malloc */
> if ((gulong) view->s.st_size == view->s.st_size)
>     view->data = (unsigned char *) g_malloc ((gulong) view->s.st_size);
> 

Yes, this sure is much simpler :) Just don't forget to view->data=NULL in
the else branch as otherwise you'll get a segfault here:

       if (view->data != NULL)
            g_free (view->data);

> Thank you for reporting the problem!

You're welcome. I had to fix this anyway to get a working mc package for
the next version of SuSE Linux, and a fix accepted upstream is one fix less
I have to maintain :)

Philipp

-- 
Philipp Thomas <[EMAIL PROTECTED]>
SuSE Linux AG, Deutschherrnstr. 15-19, D-90429 Nuremberg, Germany
_______________________________________________
Mc-devel mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/mc-devel

Reply via email to