diff options
author | jilles <jilles@FreeBSD.org> | 2015-12-23 18:24:40 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2015-12-23 18:24:40 +0000 |
commit | ce8728e0fac8e73c4cf9e1fb0aefa24b63b0813a (patch) | |
tree | cc93de9a13eede769c8bba5cdc8ad68655e523ae /bin/sh | |
parent | f5638e51344c0944f71c9a8782413ec130750d3a (diff) | |
download | FreeBSD-src-ce8728e0fac8e73c4cf9e1fb0aefa24b63b0813a.zip FreeBSD-src-ce8728e0fac8e73c4cf9e1fb0aefa24b63b0813a.tar.gz |
MFC r292360: sh: Fix use-after-free when attempting to modify a read-only
variable.
Reported by: bapt
Diffstat (limited to 'bin/sh')
-rw-r--r-- | bin/sh/var.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/sh/var.c b/bin/sh/var.c index ebeff16..d083523 100644 --- a/bin/sh/var.c +++ b/bin/sh/var.c @@ -328,7 +328,7 @@ setvareq(char *s, int flags) if (vp->flags & VREADONLY) { if ((flags & (VTEXTFIXED|VSTACK)) == 0) ckfree(s); - error("%.*s: is read only", vp->name_len, s); + error("%.*s: is read only", vp->name_len, vp->text); } if (flags & VNOSET) { if ((flags & (VTEXTFIXED|VSTACK)) == 0) |