[PATCH] mc crashes when temporary directory cannot be created

Jindrich Novy jnovy at redhat.com
Mon Nov 27 12:26:15 UTC 2006


Hi all,

there is a breakage in util.c and utilunix.c related to temporary files
creation. The problem is that if a directory for temporary files cannot
be created mc ends up in infinite loop caused by:

tmpbase = concat_dir_and_file (mc_tmpdir (), prefix);

in mc_mkstemps() which then calls mc_tmpdir() back infinitely and ends
up in a stack underflow.

The attached patch fixes it as it disables the creation of the temporary
files when the temp. directory couldn't be created.

Cheers,
Jindrich
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mc-tmpcrash.patch
Type: text/x-patch
Size: 650 bytes
Desc: not available
URL: <http://lists.midnight-commander.org/pipermail/mc-devel/attachments/20061127/70c043d7/attachment.bin>


More information about the mc-devel mailing list