- Fix occasional crash on LinuxPPC. Patch from Franz Sirl

<Franz.Sirl-kernel@lauterbach.com>
This commit is contained in:
Damien Miller 1999-12-31 09:16:40 +11:00
parent f3e8be87eb
commit 03783f0477
2 changed files with 8 additions and 4 deletions

View File

@ -4,6 +4,8 @@
HARUYAMA Seigo <haruyama@nt.phys.s.u-tokyo.ac.jp> HARUYAMA Seigo <haruyama@nt.phys.s.u-tokyo.ac.jp>
- Fix broken autoconf typedef detection. Report from Marc G. - Fix broken autoconf typedef detection. Report from Marc G.
Fournier <marc.fournier@acadiau.ca> Fournier <marc.fournier@acadiau.ca>
- Fix occasional crash on LinuxPPC. Patch from Franz Sirl
<Franz.Sirl-kernel@lauterbach.com>
19991230 19991230
- OpenBSD CVS updates: - OpenBSD CVS updates:

10
scp.c
View File

@ -45,7 +45,7 @@
*/ */
#include "includes.h" #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 "ssh.h"
#include "xmalloc.h" #include "xmalloc.h"
@ -922,22 +922,24 @@ run_err(const char *fmt,...)
{ {
static FILE *fp; static FILE *fp;
va_list ap; va_list ap;
va_start(ap, fmt);
++errs; ++errs;
if (fp == NULL && !(fp = fdopen(remout, "w"))) if (fp == NULL && !(fp = fdopen(remout, "w")))
return; return;
(void) fprintf(fp, "%c", 0x01); (void) fprintf(fp, "%c", 0x01);
(void) fprintf(fp, "scp: "); (void) fprintf(fp, "scp: ");
va_start(ap, fmt);
(void) vfprintf(fp, fmt, ap); (void) vfprintf(fp, fmt, ap);
va_end(ap);
(void) fprintf(fp, "\n"); (void) fprintf(fp, "\n");
(void) fflush(fp); (void) fflush(fp);
if (!iamremote) { if (!iamremote) {
va_start(ap, fmt);
vfprintf(stderr, fmt, ap); vfprintf(stderr, fmt, ap);
va_end(ap);
fprintf(stderr, "\n"); fprintf(stderr, "\n");
} }
va_end(ap);
} }
/* Stuff below is from BSD rcp util.c. */ /* 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 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * 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 * char *