summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>1999-12-31 09:16:40 +1100
committerDamien Miller <djm@mindrot.org>1999-12-31 09:16:40 +1100
commit03783f0477a97346afaa506667f1cd91f943a6fd (patch)
tree9e2a455f45d3fbf125ded61117a232c64500af22
parentf3e8be87ebf4eb489bcf983cf60f5f55755a8740 (diff)
- Fix occasional crash on LinuxPPC. Patch from Franz Sirl
<Franz.Sirl-kernel@lauterbach.com>
-rw-r--r--ChangeLog2
-rw-r--r--scp.c10
2 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 4dac089f0..7dd5e869c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@
4 HARUYAMA Seigo <haruyama@nt.phys.s.u-tokyo.ac.jp> 4 HARUYAMA Seigo <haruyama@nt.phys.s.u-tokyo.ac.jp>
5 - Fix broken autoconf typedef detection. Report from Marc G. 5 - Fix broken autoconf typedef detection. Report from Marc G.
6 Fournier <marc.fournier@acadiau.ca> 6 Fournier <marc.fournier@acadiau.ca>
7 - Fix occasional crash on LinuxPPC. Patch from Franz Sirl
8 <Franz.Sirl-kernel@lauterbach.com>
7 9
819991230 1019991230
9 - OpenBSD CVS updates: 11 - OpenBSD CVS updates:
diff --git a/scp.c b/scp.c
index 385e24b61..d54a7c854 100644
--- a/scp.c
+++ b/scp.c
@@ -45,7 +45,7 @@
45 */ 45 */
46 46
47#include "includes.h" 47#include "includes.h"
48RCSID("$Id: scp.c,v 1.14 1999/12/16 02:05:17 damien Exp $"); 48RCSID("$Id: scp.c,v 1.15 1999/12/30 22:16:40 damien Exp $");
49 49
50#include "ssh.h" 50#include "ssh.h"
51#include "xmalloc.h" 51#include "xmalloc.h"
@@ -922,22 +922,24 @@ run_err(const char *fmt,...)
922{ 922{
923 static FILE *fp; 923 static FILE *fp;
924 va_list ap; 924 va_list ap;
925 va_start(ap, fmt);
926 925
927 ++errs; 926 ++errs;
928 if (fp == NULL && !(fp = fdopen(remout, "w"))) 927 if (fp == NULL && !(fp = fdopen(remout, "w")))
929 return; 928 return;
930 (void) fprintf(fp, "%c", 0x01); 929 (void) fprintf(fp, "%c", 0x01);
931 (void) fprintf(fp, "scp: "); 930 (void) fprintf(fp, "scp: ");
931 va_start(ap, fmt);
932 (void) vfprintf(fp, fmt, ap); 932 (void) vfprintf(fp, fmt, ap);
933 va_end(ap);
933 (void) fprintf(fp, "\n"); 934 (void) fprintf(fp, "\n");
934 (void) fflush(fp); 935 (void) fflush(fp);
935 936
936 if (!iamremote) { 937 if (!iamremote) {
938 va_start(ap, fmt);
937 vfprintf(stderr, fmt, ap); 939 vfprintf(stderr, fmt, ap);
940 va_end(ap);
938 fprintf(stderr, "\n"); 941 fprintf(stderr, "\n");
939 } 942 }
940 va_end(ap);
941} 943}
942 944
943/* Stuff below is from BSD rcp util.c. */ 945/* Stuff below is from BSD rcp util.c. */
@@ -974,7 +976,7 @@ run_err(const char *fmt,...)
974 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 976 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
975 * SUCH DAMAGE. 977 * SUCH DAMAGE.
976 * 978 *
977 * $Id: scp.c,v 1.14 1999/12/16 02:05:17 damien Exp $ 979 * $Id: scp.c,v 1.15 1999/12/30 22:16:40 damien Exp $
978 */ 980 */
979 981
980char * 982char *