svn rev #3330: trunk/gssftp/ftp/
ghudson@MIT.EDU
ghudson at MIT.EDU
Fri Jan 27 15:41:47 EST 2012
Commit By: ghudson
Log Message:
ticket: 7079
Ensure termination of file mode in gssftps' mls
Depending on stack contents, mls or mdir could sporadically fail due
to an unterminated file mode argument. Patch from Siddhesh Poyarekar
via nalin at redhat.com.
Changed Files:
U trunk/gssftp/ftp/cmds.c
Modified: trunk/gssftp/ftp/cmds.c
===================================================================
--- trunk/gssftp/ftp/cmds.c 2011-12-27 17:14:35 UTC (rev 3329)
+++ trunk/gssftp/ftp/cmds.c 2012-01-27 20:41:46 UTC (rev 3330)
@@ -1479,7 +1479,7 @@
{
sig_t oldintr;
int ointer, i;
- char *volatile cmd, rmode[1], *dest;
+ char *volatile cmd, rmode[2], *dest;
if (argc < 2 && !another(&argc, &argv, "remote-files"))
goto usage;
@@ -1503,7 +1503,8 @@
oldintr = signal(SIGINT, mabort);
(void) setjmp(jabort);
for (i = 1; mflag && i < argc-1; ++i) {
- *rmode = (i == 1) ? 'w' : 'a';
+ rmode[0] = (i == 1) ? 'w' : 'a';
+ rmode[1] = 0;
recvrequest(cmd, dest, argv[i], rmode, 0, 0);
if (!mflag && fromatty) {
ointer = interactive;
More information about the Krb5-appl-commits
mailing list