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

Pedro F. Giffuni pfg at FreeBSD.org
Wed Jun 8 19:39:45 UTC 2016


Author: pfg
Date: Wed Jun  8 19:39:44 2016
New Revision: 301691
URL: https://svnweb.freebsd.org/changeset/base/301691

Log:
  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	Wed Jun  8 19:31:12 2016	(r301690)
+++ head/contrib/one-true-awk/tran.c	Wed Jun  8 19:39:44 2016	(r301691)
@@ -333,7 +333,7 @@ char *setsval(Cell *vp, const char *s)	/
 		donefld = 0;	/* mark $1... invalid */
 		donerec = 1;
 	}
-	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;


More information about the svn-src-head mailing list