gcc484ntopperl-5.22
Last change
on this file since 0105685 was
c5c522c,
checked in by Edwin Eefting <edwin@datux.nl>, 8 years ago
|
initial commit, transferred from cleaned syn3 svn tree
|
-
Property mode set to
100644
|
File size:
1.7 KB
|
Rev | Line | |
---|
[c5c522c] | 1 | --- netkit-ftp-0.17/ftp/ftp.c.segv 2004-06-14 11:04:38.000000000 -0400 |
---|
| 2 | +++ netkit-ftp-0.17/ftp/ftp.c 2004-06-14 11:06:46.000000000 -0400 |
---|
| 3 | @@ -472,6 +472,8 @@ |
---|
| 4 | return (0); |
---|
| 5 | } |
---|
| 6 | lostpeer(0); |
---|
| 7 | + fclose(cout); |
---|
| 8 | + cout = NULL; |
---|
| 9 | if (verbose) { |
---|
| 10 | printf("421 Service not available, remote server has closed connection\n"); |
---|
| 11 | (void) fflush(stdout); |
---|
| 12 | @@ -529,7 +531,14 @@ |
---|
| 13 | cpend = 0; |
---|
| 14 | (void) signal(SIGINT,oldintr); |
---|
| 15 | if (code == 421 || originalcode == 421) |
---|
| 16 | + { |
---|
| 17 | lostpeer(0); |
---|
| 18 | + if(cout) |
---|
| 19 | + { |
---|
| 20 | + fclose(cout); |
---|
| 21 | + cout = NULL; |
---|
| 22 | + } |
---|
| 23 | + } |
---|
| 24 | if (abrtflag && oldintr != cmdabort && oldintr != SIG_IGN) |
---|
| 25 | (*oldintr)(SIGINT); |
---|
| 26 | return (n - '0'); |
---|
| 27 | @@ -1790,6 +1799,11 @@ |
---|
| 28 | if (ptabflg) |
---|
| 29 | code = -1; |
---|
| 30 | lostpeer(0); |
---|
| 31 | + if(cout != NULL) |
---|
| 32 | + { |
---|
| 33 | + fclose(cout); |
---|
| 34 | + cout = NULL; |
---|
| 35 | + } |
---|
| 36 | } |
---|
| 37 | (void) getreply(0); |
---|
| 38 | (void) getreply(0); |
---|
| 39 | @@ -1815,6 +1829,11 @@ |
---|
| 40 | perror("reset"); |
---|
| 41 | code = -1; |
---|
| 42 | lostpeer(0); |
---|
| 43 | + if(cout != NULL) |
---|
| 44 | + { |
---|
| 45 | + fclose(cout); |
---|
| 46 | + cout = NULL; |
---|
| 47 | + } |
---|
| 48 | } |
---|
| 49 | else if (nfnd) { |
---|
| 50 | (void) getreply(0); |
---|
| 51 | @@ -1897,6 +1916,11 @@ |
---|
| 52 | if (ptabflg) |
---|
| 53 | code = -1; |
---|
| 54 | lostpeer(0); |
---|
| 55 | + if(cout != NULL) |
---|
| 56 | + { |
---|
| 57 | + fclose(cout); |
---|
| 58 | + cout = NULL; |
---|
| 59 | + } |
---|
| 60 | } |
---|
| 61 | if (din && FD_ISSET(fileno(din), &mask)) { |
---|
| 62 | while (read(fileno(din), buf, BUFSIZ) > 0) |
---|
| 63 | --- netkit-ftp-0.17/ftp/main.c.segv 2004-06-14 11:03:18.000000000 -0400 |
---|
| 64 | +++ netkit-ftp-0.17/ftp/main.c 2004-06-14 11:03:42.000000000 -0400 |
---|
| 65 | @@ -235,8 +235,6 @@ |
---|
| 66 | if (connected) { |
---|
| 67 | if (cout != NULL) { |
---|
| 68 | shutdown(fileno(cout), 1+1); |
---|
| 69 | - fclose(cout); |
---|
| 70 | - cout = NULL; |
---|
| 71 | } |
---|
| 72 | if (data >= 0) { |
---|
| 73 | shutdown(data, 1+1); |
---|
| 74 | @@ -249,8 +247,6 @@ |
---|
| 75 | if (connected) { |
---|
| 76 | if (cout != NULL) { |
---|
| 77 | shutdown(fileno(cout), 1+1); |
---|
| 78 | - fclose(cout); |
---|
| 79 | - cout = NULL; |
---|
| 80 | } |
---|
| 81 | connected = 0; |
---|
| 82 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.