Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/bin/sh
Module Name: src
Committed By: kre
Date: Mon May 12 02:45:28 UTC 2025
Modified Files:
src/bin/sh: alias.c
Log Message:
Fix a (probably) minor alias command bug
If run as
alias ''
the implementation could potentially reference
uninit'd memory, potentially even leading to a
SEGV, though in testing that doesn't happen, and
I doubt ever could.
Note this only occurs because of some ancient
code commented as "funny ksh stuff" with the
seemingly exotic purpose of allowing '=' to be
an alias.
Prevent even the possibility of the bug, and if
nothing else, make the error message that now
occurs more explicitly indicate the issue.
Note that this code (& this bug) has been in sh since
rev 1.1 of this file (ie: forever in NetBSD, and
before it - original ash had no aliases, so it wasn't
in that, but it has been in CSRG sh since aliases were
first added to that (sccs rev 1.1), in May 1992) and
has never been observed or reported as a problem, that
I'm aware of anyway, so I am not planning any pullups of
this fix. Found by code reading alone.
To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/bin/sh/alias.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