From owner-svn-src-head@FreeBSD.ORG Sat Dec 21 11:59:59 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8086AE7A; Sat, 21 Dec 2013 11:59:59 +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)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 676961001; Sat, 21 Dec 2013 11:59:59 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBLBxxhu011771; Sat, 21 Dec 2013 11:59:59 GMT (envelope-from jilles@svn.freebsd.org) Received: (from jilles@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBLBxxOE011770; Sat, 21 Dec 2013 11:59:59 GMT (envelope-from jilles@svn.freebsd.org) Message-Id: <201312211159.rBLBxxOE011770@svn.freebsd.org> From: Jilles Tjoelker Date: Sat, 21 Dec 2013 11:59:59 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r259677 - head/sbin/swapon 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.17 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: Sat, 21 Dec 2013 11:59:59 -0000 Author: jilles Date: Sat Dec 21 11:59:58 2013 New Revision: 259677 URL: http://svnweb.freebsd.org/changeset/base/259677 Log: swapon: Fix buffer overflow when configuring encrypted swap on GBDE. PR: bin/184950 Tested by: Radim Kolar MFC after: 3 days Modified: head/sbin/swapon/swapon.c Modified: head/sbin/swapon/swapon.c ============================================================================== --- head/sbin/swapon/swapon.c Sat Dec 21 04:31:54 2013 (r259676) +++ head/sbin/swapon/swapon.c Sat Dec 21 11:59:58 2013 (r259677) @@ -266,7 +266,8 @@ static const char * swap_on_off_gbde(const char *name, int doingall) { const char *ret; - char pass[64 * 2 + 1], bpass[64]; + char pass[64 * 2 + 1]; + unsigned char bpass[64]; char *dname; int i, error;