Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jun 2016 19:39:44 +0000 (UTC)
From:      "Pedro F. Giffuni" <pfg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r301691 - head/contrib/one-true-awk
Message-ID:  <201606081939.u58JdidS080327@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201606081939.u58JdidS080327>