Ticket #3736 (closed defect: fixed)
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: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: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
Branch: 3736_mc_tmpdir
changeset:0cf8e8f6e00c96726e143cd6f6ca7eb74a4324e6
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!
I created a PR that is supposed to address this issue at https://github.com/MidnightCommander/mc/pull/119