Re: show_dir crashes on more than 200 columns
- From: Pavel Tsekov <ptsekov gmx net>
- To: Leonard den Ottolander <leonard den ottolander nl>
- Cc: MC Devel <mc-devel gnome org>
- Subject: Re: show_dir crashes on more than 200 columns
- Date: Wed, 3 Nov 2004 12:50:25 +0100
Hello,
On Wed, 3 Nov 2004, Leonard den Ottolander wrote:
> A small fix to avoid a crash in show_dir() with a panel of more than 200
> columns. Thanks to Vladimir.
>
> (Jindrich, a g_malloc0 and a free of tmp[] seem rather redundant here.)
No, it is not. You cannot rely on MC_MAXPATHLEN - it can be too small or
too big. For exmaple on Cygwin it is set to 259 . I remeber I've seen
also pretty big values for MAXPATHLEN which are not suitable for
allocating on the stack. Use the `widget.cols' and allocate memory from
the heap.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]