From owner-svn-src-all@FreeBSD.ORG Sun Aug 10 07:51:56 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 214C7E17 for ; Sun, 10 Aug 2014 07:51:56 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id E51832481 for ; Sun, 10 Aug 2014 07:51:55 +0000 (UTC) Received: from hselasky (uid 1241) (envelope-from hselasky@FreeBSD.org) id 20e4 by svn.freebsd.org (DragonFly Mail Agent v0.9+); Sun, 10 Aug 2014 07:51:55 +0000 From: Hans Petter Selasky Date: Sun, 10 Aug 2014 07:51:55 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r269777 - head/sys/netinet/cc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Message-Id: <53e7249b.20e4.485017ca@svn.freebsd.org> X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Aug 2014 07:51:56 -0000 Author: hselasky Date: Sun Aug 10 07:51:55 2014 New Revision: 269777 URL: http://svnweb.freebsd.org/changeset/base/269777 Log: Fix string length argument passed to "sysctl_handle_string()" so that the complete string is returned by the function and not just only one byte. PR: 192544 MFC after: 2 weeks Modified: head/sys/netinet/cc/cc.c Modified: head/sys/netinet/cc/cc.c ============================================================================== --- head/sys/netinet/cc/cc.c Sun Aug 10 06:56:43 2014 (r269776) +++ head/sys/netinet/cc/cc.c Sun Aug 10 07:51:55 2014 (r269777) @@ -101,7 +101,7 @@ cc_default_algo(SYSCTL_HANDLER_ARGS) CC_LIST_RLOCK(); strlcpy(default_cc, CC_DEFAULT()->name, TCP_CA_NAME_MAX); CC_LIST_RUNLOCK(); - err = sysctl_handle_string(oidp, default_cc, 1, req); + err = sysctl_handle_string(oidp, default_cc, 0, req); } else { /* Find algo with specified name and set it to default. */ CC_LIST_RLOCK(); @@ -166,7 +166,7 @@ cc_list_available(SYSCTL_HANDLER_ARGS) if (!err) { sbuf_finish(s); - err = sysctl_handle_string(oidp, sbuf_data(s), 1, req); + err = sysctl_handle_string(oidp, sbuf_data(s), 0, req); } sbuf_delete(s);