diff options
author | Dan Winship <danw@mit.edu> | 1998-04-07 21:02:02 +0000 |
---|---|---|
committer | Dan Winship <danw@mit.edu> | 1998-04-07 21:02:02 +0000 |
commit | 196d49f424c4606b98c7e366d3ae74c8d9b6040d (patch) | |
tree | 8f6e50b127f3e2309aace0e87fe310601d4e1641 /src/appl/gssftp | |
parent | d2d02dd231a5e76e2a7637eeee957002cddd99d3 (diff) | |
download | krb5-196d49f424c4606b98c7e366d3ae74c8d9b6040d.zip krb5-196d49f424c4606b98c7e366d3ae74c8d9b6040d.tar.gz krb5-196d49f424c4606b98c7e366d3ae74c8d9b6040d.tar.bz2 |
* secure.c (secure_putbyte): Set nout = 0 *before* calling
secure_putbuf: if the transfer is aborted, the SIGURG handler will
longjmp out, so the line after the secure_putbuf will never get
executed, so nout would never be reset and the next transfer
would overrun ucbuf.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@10524 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/appl/gssftp')
-rw-r--r-- | src/appl/gssftp/ftp/ChangeLog | 8 | ||||
-rw-r--r-- | src/appl/gssftp/ftp/secure.c | 2 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/appl/gssftp/ftp/ChangeLog b/src/appl/gssftp/ftp/ChangeLog index f900c7f..9fbe76b 100644 --- a/src/appl/gssftp/ftp/ChangeLog +++ b/src/appl/gssftp/ftp/ChangeLog @@ -1,3 +1,11 @@ +Tue Apr 7 16:53:58 1998 Dan Winship <danw@mit.edu> + + * secure.c (secure_putbyte): Set nout = 0 *before* calling + secure_putbuf: if the transfer is aborted, the SIGURG handler will + longjmp out, so the line after the secure_putbuf will never get + executed, so nout would never be reset and the next transfer + would overrun ucbuf. + Wed Feb 18 15:29:35 1998 Tom Yu <tlyu@mit.edu> * Makefile.in: Remove trailing slash from thisconfigdir. Fix up diff --git a/src/appl/gssftp/ftp/secure.c b/src/appl/gssftp/ftp/secure.c index a379370..cc707ff 100644 --- a/src/appl/gssftp/ftp/secure.c +++ b/src/appl/gssftp/ftp/secure.c @@ -154,8 +154,8 @@ unsigned char c; ucbuf[nout++] = c; if (nout == MAX - FUDGE_FACTOR) { - ret = secure_putbuf(fd, ucbuf, nout); nout = 0; + ret = secure_putbuf(fd, ucbuf, MAX - FUDGE_FACTOR); return(ret?ret:c); } return (c); |