Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): fix garbled output for failed shell co...



details:   https://anonhg.NetBSD.org/src/rev/e820e1aea762
branches:  trunk
changeset: 958049:e820e1aea762
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Dec 21 02:09:34 2020 +0000

description:
make(1): fix garbled output for failed shell command (since 2020-12-20)

Passing a struct as printf argument for the %s conversion doesn't work.
On NetBSD-8.0-x86_64, the output looks normal, but on SunOS-5.9, the
output is garbled, containing bytes 0xFF and 0xFE.

This bug had been introduced in parse.c 1.507 from 2020-12-20 14:52:16.

Thanks to sjg for finding this bug so quickly.

diffstat:

 usr.bin/make/parse.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 249b952a18a4 -r e820e1aea762 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Mon Dec 21 00:30:13 2020 +0000
+++ b/usr.bin/make/parse.c      Mon Dec 21 02:09:34 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.508 2020/12/20 18:23:24 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.509 2020/12/21 02:09:34 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -117,7 +117,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.508 2020/12/20 18:23:24 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.509 2020/12/21 02:09:34 rillig Exp $");
 
 /* types and constants */
 
@@ -1980,7 +1980,7 @@
        *out_avalue = FStr_InitOwn(cmdOut);
 
        if (errfmt != NULL)
-               Parse_Error(PARSE_WARNING, errfmt, cmd);
+               Parse_Error(PARSE_WARNING, errfmt, cmd.str);
 
        FStr_Done(&cmd);
 }



Home | Main Index | Thread Index | Old Index