svn commit: r348518 - head/contrib/one-true-awk

Warner Losh imp at FreeBSD.org
Sun Jun 2 20:47:16 UTC 2019


Author: imp
Date: Sun Jun  2 20:47:15 2019
New Revision: 348518
URL: https://svnweb.freebsd.org/changeset/base/348518

Log:
  Reapply r301691:
  
  Revert r301689 - one-true-awk: Avoid a NULL dereference.
  
  I got this wrong and the coverity report doesn't match the NetBSD change,
  which was thought for a different version.
  
  The change wouldn't hurt but let's wait until upstream figures this out.

Modified:
  head/contrib/one-true-awk/tran.c

Modified: head/contrib/one-true-awk/tran.c
==============================================================================
--- head/contrib/one-true-awk/tran.c	Sun Jun  2 20:03:00 2019	(r348517)
+++ head/contrib/one-true-awk/tran.c	Sun Jun  2 20:47:15 2019	(r348518)
@@ -366,7 +366,7 @@ char *setsval(Cell *vp, const char *s)	/* set string v
 		if (donerec == 0)
 			recbld();
 	}
-	t = s ? tostring(s) : tostring("");	/* in case it's self-assign */
+	t = tostring(s);	/* in case it's self-assign */
 	if (freeable(vp))
 		xfree(vp->sval);
 	vp->tval &= ~(NUM|CONVC|CONVO);


More information about the svn-src-head mailing list