Ticket #3736 (closed defect: fixed)

Opened 8 years ago

Last modified 8 years ago

mc_tmpdir() use a buffer on only 64 characters

Reported by: sorin Owned by: andrew_b
Priority: major Milestone: 4.8.19
Component: mc-core Version: master
Keywords: Cc:
Blocked By: Blocking:
Branch state: merged Votes for changeset: committed-master

Description

It seems that mc_tmpdir() is using a buffer that is far too small, causing problems on some operating systems like Mac OS.

One example http://dennis.dieploegers.de/using-mc-wrapper-sh-on-a-mac/

The buffer should be increased to at least 256 characters.

Change History

comment:1 Changed 8 years ago by sorin

I created a PR that is supposed to address this issue at https://github.com/MidnightCommander/mc/pull/119

comment:2 Changed 8 years ago by egmont

I think this method should rather dynamically allocate the required space, without introducing another (higher, but still) arbitrary limit.

comment:3 Changed 8 years ago by sorin

I updated the PR to use MAX_PATH which is much better than approach, at least it will bring this to the same value that is used in many other places in mc.

comment:4 Changed 8 years ago by egmont

Sounds great to me, thanks!

comment:5 Changed 8 years ago by andrew_b

  • Status changed from new to accepted
  • Owner set to andrew_b
  • Milestone changed from Future Releases to 4.8.19

comment:6 Changed 8 years ago by andrew_b

  • Votes for changeset set to andrew_b
  • Branch state changed from no branch to approved

comment:7 Changed 8 years ago by andrew_b

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b to committed-master
  • Resolution set to fixed
  • Branch state changed from approved to merged

Merged to master: [87cc7baeada00e58765a15ae0e573d6964f8d7f6].

Thanks!

comment:8 Changed 8 years ago by andrew_b

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.