* secure.c (secure_putbyte): Set nout = 0 *before* calling
authorDan Winship <danw@mit.edu>
Tue, 7 Apr 1998 21:02:02 +0000 (21:02 +0000)
committerDan Winship <danw@mit.edu>
Tue, 7 Apr 1998 21:02:02 +0000 (21:02 +0000)
        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

src/appl/gssftp/ftp/ChangeLog
src/appl/gssftp/ftp/secure.c

index f900c7fd513482cd75685c821ae2a48eb2a403cc..9fbe76b1230aa147ee07d26bad1e5d1f8af6b884 100644 (file)
@@ -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
index a379370ebc9b6c11f24584ebe2ffa13ac9b7d7aa..cc707ffd3ef383b0cfe5d4d033e969cf31e8b522 100644 (file)
@@ -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);