svn commit: r292664 - stable/10/bin/sh
Jilles Tjoelker
jilles at FreeBSD.org
Wed Dec 23 18:24:41 UTC 2015
Author: jilles
Date: Wed Dec 23 18:24:40 2015
New Revision: 292664
URL: https://svnweb.freebsd.org/changeset/base/292664
Log:
MFC r292360: sh: Fix use-after-free when attempting to modify a read-only
variable.
Reported by: bapt
Modified:
stable/10/bin/sh/var.c
Directory Properties:
stable/10/ (props changed)
Modified: stable/10/bin/sh/var.c
==============================================================================
--- stable/10/bin/sh/var.c Wed Dec 23 17:54:19 2015 (r292663)
+++ stable/10/bin/sh/var.c Wed Dec 23 18:24:40 2015 (r292664)
@@ -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)
More information about the svn-src-stable-10
mailing list