Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Jun 2014 23:42:53 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r267886 - head/usr.bin/procstat
Message-ID:  <201406252342.s5PNgrgg014127@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Wed Jun 25 23:42:53 2014
New Revision: 267886
URL: http://svnweb.freebsd.org/changeset/base/267886

Log:
  Use correct length for buffer.
  
  Submitted by:	Sascha Wildner <swildner dragonflybsd org>
  MFC after:	2 weeks

Modified:
  head/usr.bin/procstat/procstat_files.c

Modified: head/usr.bin/procstat/procstat_files.c
==============================================================================
--- head/usr.bin/procstat/procstat_files.c	Wed Jun 25 22:59:12 2014	(r267885)
+++ head/usr.bin/procstat/procstat_files.c	Wed Jun 25 23:42:53 2014	(r267886)
@@ -114,7 +114,7 @@ addr_to_string(struct sockaddr_storage *
 			snprintf(buffer, buflen, "%s.%d", buffer2,
 			    ntohs(sin6->sin6_port));
 		else
-			strlcpy(buffer, "-", sizeof(buffer));
+			strlcpy(buffer, "-", buflen);
 		break;
 
 	default:



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