Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(mandriva) concat_dir_and_file() + NULL parameter fix #180

Closed
mc-butler opened this issue Jan 16, 2009 · 15 comments
Closed

(mandriva) concat_dir_and_file() + NULL parameter fix #180

mc-butler opened this issue Jan 16, 2009 · 15 comments
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress ver: 4.6.1 Reproducible in version 4.6.1
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/180
Reporter metux (@metux)
Keywords committed-mc-4.6, committed-master

http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/mc/current/SOURCES/mc-concat.patch?view=markup

branch:180_concat_dir_and_file (base mc-4.6)
[54d6ec8]

committed mc-4.6
committed master

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by styx (@styx) on Jan 25, 2009 at 21:17 UTC

@mc-butler
Copy link
Author

Changed by styx (@styx) on Jan 25, 2009 at 21:21 UTC

sorry, I'm messed up! this one should be

@mc-butler
Copy link
Author

Changed by styx (@styx) on Jan 25, 2009 at 21:25 UTC (comment 1)

  • Keywords changed from review, mandriva to review, mandriva, vote-styx

just move patch here and make a review

@mc-butler
Copy link
Author

Changed by winnie (@winnieXY) on Jan 30, 2009 at 13:18 UTC (comment 2)

  • Milestone changed from 4.7 to 4.6.3

@mc-butler
Copy link
Author

Changed by guanx (guanx.bac@….com) on Jan 30, 2009 at 22:10 UTC

Replying to metux (#180):

http://svn.mandriva.com/cgi-bin/viewvc.cgi/packages/cooker/mc/current/SOURCES/mc-concat.patch?view=markup

Here: const char *file = filename;
Why a separate variable for the filename pointer?

And, in the patch, there is this comment:
/* Is this one: *file == PATH_SEP seems to be not fully portable? */
It's also confusing.

@mc-butler
Copy link
Author

Changed by metux (@metux) on Jan 31, 2009 at 15:54 UTC (comment 4)

  • Description edited
  • Status changed from new to accepted
  • Owner set to metux

I've reworked the whole function and replaced it by mhl_str_dir_plus_file() in mhl/string.h

@mc-butler
Copy link
Author

Changed by slyfox (@trofi) on Jan 31, 2009 at 16:08 UTC (comment 5)

  • Keywords changed from review, mandriva, vote-styx to mandriva, vote-styx, vote-slyfox, approved

@mc-butler
Copy link
Author

Changed by metux (@metux) on Jan 31, 2009 at 17:21 UTC (comment 6)

  • Keywords changed from mandriva, vote-styx, vote-slyfox, approved to committed-mc-4.6, committed-master
  • Status changed from accepted to testing
  • Resolution set to fixed
  • Description edited

@mc-butler
Copy link
Author

Changed by winnie (@winnieXY) on Feb 1, 2009 at 10:38 UTC (comment 7)

  • Milestone changed from 4.6.3 to 4.6.2
  • Status changed from testing to closed

Moving this to 4.6.2 as this is already fixed in 4.6 branch. We need to update NEWS file.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Feb 1, 2009 at 14:03 UTC (comment 4.8)

  • Resolution fixed deleted
  • Status changed from closed to reopened

Replying to metux:

I've reworked the whole function and replaced it by mhl_str_dir_plus_file() in mhl/string.h

First:

charsets.o: In function `load_codepages_list':
/home/andrew/work.c/mc/mc.master/src/charsets.c:51: undefined reference to `mhl_str_dir_plus_file'
../vfs/libvfs-mc.a(smbfs.o): In function `smbfs_get_path':
/home/andrew/work.c/mc/mc.master/vfs/smbfs.c:1214: undefined reference to `mhl_str_dir_plus_file'
collect2: ld returned 1 exit status

#include <mhl/string.h> is forgotten in those files.

Second: in mhl_str_dir_plus_file() there are incorrect type of strlen() results: int instead of size_t.

@mc-butler
Copy link
Author

Changed by metux (@metux) on Feb 1, 2009 at 19:34 UTC (comment 9)

  • Status changed from reopened to accepted

@mc-butler
Copy link
Author

Changed by metux (@metux) on Feb 1, 2009 at 19:34 UTC (comment 10)

  • Status changed from accepted to testing
  • Resolution set to fixed

@mc-butler
Copy link
Author

Changed by slyfox (@trofi) on Feb 1, 2009 at 21:12 UTC (comment 11)

charsets.o: In function `load_codepages_list':
/home/andrew/work.c/mc/mc.master/src/charsets.c:51: undefined reference to `mhl_str_dir_plus_file'
../vfs/libvfs-mc.a(smbfs.o): In function `smbfs_get_path':
/home/andrew/work.c/mc/mc.master/vfs/smbfs.c:1214: undefined reference to `mhl_str_dir_plus_file'
collect2: ld returned 1 exit status

Those are fixed and will be available in mc-4.6.2.
Thanks!

Second: in mhl_str_dir_plus_file() there are incorrect type of strlen() results: int instead of size_t.

It is sane cleanup. Will be applied in next (after mc-4.6.2) bugfix.
Thanks again! :]

@mc-butler
Copy link
Author

Changed by winnie (@winnieXY) on Feb 1, 2009 at 21:20 UTC (comment 12)

  • Status changed from testing to closed

Okay.. I'll close this report.. the type cleanup will be available in the next version of mc (4.6.3 or 4.6.2.1, not sure up to now).

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Feb 20, 2025 at 15:47 UTC (comment 13)

Ticket #233 has been marked as a duplicate of this ticket.

@mc-butler mc-butler marked this as a duplicate of #233 Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: medium Has the potential to affect progress ver: 4.6.1 Reproducible in version 4.6.1
Development

No branches or pull requests

1 participant