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

mc segfaults when you try to use non-anonymous FTP #1580

Closed
mc-butler opened this issue Sep 3, 2009 · 17 comments
Closed

mc segfaults when you try to use non-anonymous FTP #1580

mc-butler opened this issue Sep 3, 2009 · 17 comments
Labels
area: vfs Virtual File System support prio: high Serious problem that could block progress
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/1580
Reporter zaytsev (@zyv)
Keywords ftp, vfs

Hi!

When you try to login using FTP as a not anonymous user (e.g. user@host) mc segfaults as you enter the address and the username. This became broken very recently, mc build from one week ago worked just fine.

dbg backtraces:

http://www.nopaste.com/p/aG06r983bb
http://www.nopaste.com/p/aeQhfJPfO

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Sep 3, 2009 at 18:23 UTC (comment 1)

  • Version changed from 4.7.0-pre2 to master
  • Milestone changed from 4.7 to 4.7.0-pre3

@mc-butler
Copy link
Author

Changed by iNode (@iNode) on Sep 3, 2009 at 18:57 UTC (comment 2)

Should we init def_text by NULL instead of ((char*) -1)?

initial_buffer_len = 1 + max ((size_t) width, strlen (def_text));
// strlen((char*) -1); it's isn't correct 

@mc-butler
Copy link
Author

Changed by iNode (@iNode) on Sep 3, 2009 at 19:01 UTC (comment 3)

diff --git a/src/wtools.h b/src/wtools.h
index 1fc45ad..5e71949 100644
--- a/src/wtools.h
+++ b/src/wtools.h
@@ -172,7 +172,7 @@ int quick_dialog_skip (QuickDialog *qd, int nskip);
 /* The input dialogs */
 
 /* Pass this as def_text to request a password */
-#define INPUT_PASSWORD ((char *) -1)
+#define INPUT_PASSWORD ((char *) NULL)
 
 char *input_dialog (const char *header, const char *text,
                    const char *history_name, const char *def_text);

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Sep 3, 2009 at 19:45 UTC (comment 4)

Thanks!!! Attached patch works for me. Will vote for inclusion as soon as a branch is created.

@mc-butler
Copy link
Author

Changed by iNode (@iNode) on Sep 4, 2009 at 5:15 UTC (comment 5)

  • Owner set to iNode
  • Status changed from new to accepted

@mc-butler
Copy link
Author

Changed by iNode (@iNode) on Sep 4, 2009 at 5:50 UTC (comment 6)

  • Severity changed from no branch to on rework

It was just workaround. It works but it's invalid because it's allow save input password in history. Please clean manually your history if you use it.

branch:1580_ftp_input_password (parent:master)
changeset: [40057ff3a66b39cdb03c772f43b847ae0b05847d]

@mc-butler
Copy link
Author

Changed by iNode (@iNode) on Sep 4, 2009 at 5:51 UTC (comment 7)

  • Severity changed from on rework to on review

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Sep 5, 2009 at 11:50 UTC (comment 8)

  • Votes set to slavazanko

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Sep 7, 2009 at 13:38 UTC (comment 9)

  • Severity changed from on review to approved
  • Votes changed from slavazanko to slavazanko angel_il

@mc-butler
Copy link
Author

Changed by iNode (@iNode) on Sep 7, 2009 at 14:42 UTC (comment 10)

  • Status changed from accepted to testing
  • Resolution set to fixed
  • Votes changed from slavazanko angel_il to commited-master
  • Severity changed from approved to merged

fixed: [e05778a]

@mc-butler
Copy link
Author

Changed by iNode (@iNode) on Sep 7, 2009 at 14:42 UTC (comment 11)

  • Status changed from testing to closed

@mc-butler
Copy link
Author

Changed by iNode (@iNode) on Sep 7, 2009 at 15:50 UTC (comment 12)

  • Resolution fixed deleted
  • Status changed from closed to reopened
  • Severity changed from merged to on rework

@mc-butler
Copy link
Author

Changed by iNode (@iNode) on Sep 7, 2009 at 16:09 UTC (comment 13)

  • Status changed from reopened to accepted
  • Severity changed from on rework to on review

The same branch, please review:

[99d02797923e340b5771cf14150ff8ee0b1c20a1]

@mc-butler
Copy link
Author

Changed by angel_il (@ilia-maslakov) on Sep 8, 2009 at 5:49 UTC (comment 14)

  • Votes changed from commited-master to angel_il

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Sep 9, 2009 at 12:06 UTC (comment 15)

  • Severity changed from on review to approved
  • Votes changed from angel_il to angel_il slavazanko

@mc-butler
Copy link
Author

Changed by iNode (@iNode) on Sep 9, 2009 at 12:09 UTC (comment 16)

  • Status changed from accepted to testing
  • Resolution set to fixed
  • Severity changed from approved to merged
  • Votes changed from angel_il slavazanko to commited-master

fixed: [956d356]

@mc-butler
Copy link
Author

Changed by iNode (@iNode) on Sep 9, 2009 at 12:09 UTC (comment 17)

  • Status changed from testing to closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: vfs Virtual File System support prio: high Serious problem that could block progress
Development

No branches or pull requests

1 participant