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 4dac089f..7dd5e869 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,8 @@
HARUYAMA Seigo <haruyama@nt.phys.s.u-tokyo.ac.jp>
- Fix broken autoconf typedef detection. Report from Marc G.
Fournier <marc.fournier@acadiau.ca>
+ - Fix occasional crash on LinuxPPC. Patch from Franz Sirl
+ <Franz.Sirl-kernel@lauterbach.com>
19991230
- OpenBSD CVS updates:
diff --git a/scp.c b/scp.c
index 385e24b6..d54a7c85 100644
--- a/scp.c
+++ b/scp.c
@@ -45,7 +45,7 @@
*/
#include "includes.h"
-RCSID("$Id: scp.c,v 1.14 1999/12/16 02:05:17 damien Exp $");
+RCSID("$Id: scp.c,v 1.15 1999/12/30 22:16:40 damien Exp $");
#include "ssh.h"
#include "xmalloc.h"
@@ -922,22 +922,24 @@ run_err(const char *fmt,...)
{
static FILE *fp;
va_list ap;
- va_start(ap, fmt);
++errs;
if (fp == NULL && !(fp = fdopen(remout, "w")))
return;
(void) fprintf(fp, "%c", 0x01);
(void) fprintf(fp, "scp: ");
+ va_start(ap, fmt);
(void) vfprintf(fp, fmt, ap);
+ va_end(ap);
(void) fprintf(fp, "\n");
(void) fflush(fp);
if (!iamremote) {
+ va_start(ap, fmt);
vfprintf(stderr, fmt, ap);
+ va_end(ap);
fprintf(stderr, "\n");
}
- va_end(ap);
}
/* Stuff below is from BSD rcp util.c. */
@@ -974,7 +976,7 @@ run_err(const char *fmt,...)
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id: scp.c,v 1.14 1999/12/16 02:05:17 damien Exp $
+ * $Id: scp.c,v 1.15 1999/12/30 22:16:40 damien Exp $
*/
char *