From owner-svn-src-all@FreeBSD.ORG Fri Feb 14 20:54:04 2014 Return-Path: Delivered-To: svn-src-all@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 252BB87F; Fri, 14 Feb 2014 20:54:04 +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 1066A1655; Fri, 14 Feb 2014 20:54:04 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.8/8.14.8) with ESMTP id s1EKs3im030132; Fri, 14 Feb 2014 20:54:03 GMT (envelope-from pluknet@svn.freebsd.org) Received: (from pluknet@localhost) by svn.freebsd.org (8.14.8/8.14.8/Submit) id s1EKs3ss030131; Fri, 14 Feb 2014 20:54:03 GMT (envelope-from pluknet@svn.freebsd.org) Message-Id: <201402142054.s1EKs3ss030131@svn.freebsd.org> From: Sergey Kandaurov Date: Fri, 14 Feb 2014 20:54:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261901 - head/sys/kern X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.17 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: Fri, 14 Feb 2014 20:54:04 -0000 Author: pluknet Date: Fri Feb 14 20:54:03 2014 New Revision: 261901 URL: http://svnweb.freebsd.org/changeset/base/261901 Log: Preserve one character space for a trailing '\0'. Found by: Ivan Klymenko via cppcheck Discussed with: ae MFC after: 1 week Modified: head/sys/kern/subr_hints.c Modified: head/sys/kern/subr_hints.c ============================================================================== --- head/sys/kern/subr_hints.c Fri Feb 14 20:34:24 2014 (r261900) +++ head/sys/kern/subr_hints.c Fri Feb 14 20:54:03 2014 (r261901) @@ -210,7 +210,7 @@ res_find(int *line, int *startln, if (strncmp(cp, "hint.", 5) != 0) hit = 0; else - n = sscanf(cp, "hint.%32[^.].%d.%32[^=]=%128s", + n = sscanf(cp, "hint.%32[^.].%d.%32[^=]=%127s", r_name, &r_unit, r_resname, r_value); if (hit && n != 4) { printf("CONFIG: invalid hint '%s'\n", cp);