NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
PR/55979 CVS commit: [netbsd-9] src/bin/sh
The following reply was made to PR bin/55979; it has been noted by GNATS.
From: "Martin Husemann" <martin%netbsd.org@localhost>
To: gnats-bugs%gnats.NetBSD.org@localhost
Cc:
Subject: PR/55979 CVS commit: [netbsd-9] src/bin/sh
Date: Tue, 6 Apr 2021 17:52:03 +0000
Module Name: src
Committed By: martin
Date: Tue Apr 6 17:52:03 UTC 2021
Modified Files:
src/bin/sh [netbsd-9]: exec.c input.c
Log Message:
Pull up following revision(s) (requested by kre in ticket #1242):
bin/sh/input.c: revision 1.72
bin/sh/exec.c: revision 1.55
PR bin/55979
This fixes the MSAN detected reference to an unitialised variable
(an unitialised field in a struct) which happens when a command is
not found after a PATH search.
Aside from skipping some known to be going to fail exec*() calls
in some cases, the setting of the relevant field is irrelevant,
so this problem makes no practical difference to the shell, or any
shell script.
XXX (maybe) pullup -9
PR bin/55979
Correctly handle (ie: ignore completely) \0 chars (nuls) in the
shell command input stream (script, dot file, or stdin).
Previously nul chars were ignored correctly in the line in which
they occurred, but would cause trailing chars of that line to reappear
as the start of the following line. If there was just one \0 skipped,
this would generally result in an extra \n in the sh input, which in
most cases has no effect. With multiple \0's in a single line, more
of the end of that line was duplicated into the following one. This
usually manifested as a weird "command not found" error.
Note that any \0 chars in the sh input make the script non-conforming,
so fixing this is not crucial (no \0's should really ever be seen) but
it was an obvious bug in the code, which was attempting to ignore nul
chars (as do many other shells), so let it be fixed.
XXX pullup -9
To generate a diff of this commit:
cvs rdiff -u -r1.53.2.1 -r1.53.2.2 src/bin/sh/exec.c
cvs rdiff -u -r1.71 -r1.71.2.1 src/bin/sh/input.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index