From owner-svn-src-head@FreeBSD.ORG Mon Oct 27 16:08:42 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 594D6C06; Mon, 27 Oct 2014 16:08:42 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 45117C05; Mon, 27 Oct 2014 16:08:42 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9RG8g4k046742; Mon, 27 Oct 2014 16:08:42 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9RG8gxm046741; Mon, 27 Oct 2014 16:08:42 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201410271608.s9RG8gxm046741@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Mon, 27 Oct 2014 16:08:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r273740 - head/sys/netinet/cc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Oct 2014 16:08:42 -0000 Author: hselasky Date: Mon Oct 27 16:08:41 2014 New Revision: 273740 URL: https://svnweb.freebsd.org/changeset/base/273740 Log: Preserve limitation of "TCP_CA_NAME_MAX" when matching the algorithm name. MFC after: 3 days Suggested by: gnn @ Modified: head/sys/netinet/cc/cc.c Modified: head/sys/netinet/cc/cc.c ============================================================================== --- head/sys/netinet/cc/cc.c Mon Oct 27 15:50:47 2014 (r273739) +++ head/sys/netinet/cc/cc.c Mon Oct 27 16:08:41 2014 (r273740) @@ -107,7 +107,8 @@ cc_default_algo(SYSCTL_HANDLER_ARGS) CC_LIST_RLOCK(); STAILQ_FOREACH(funcs, &cc_list, entries) { /* NOTE: "newptr" is not zero terminated */ - if (req->newlen != strlen(funcs->name)) + if (req->newlen != strnlen(funcs->name, + TCP_CA_NAME_MAX - 1)) continue; if (bcmp(req->newptr, funcs->name, req->newlen)) continue;