From owner-p4-projects@FreeBSD.ORG Mon Oct 9 19:33:40 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 82BD716A47B; Mon, 9 Oct 2006 19:33:40 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0919116A403 for ; Mon, 9 Oct 2006 19:33:40 +0000 (UTC) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B358B43D5A for ; Mon, 9 Oct 2006 19:33:39 +0000 (GMT) (envelope-from millert@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k99JXda4092232 for ; Mon, 9 Oct 2006 19:33:39 GMT (envelope-from millert@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k99JXdOs092226 for perforce@freebsd.org; Mon, 9 Oct 2006 19:33:39 GMT (envelope-from millert@freebsd.org) Date: Mon, 9 Oct 2006 19:33:39 GMT Message-Id: <200610091933.k99JXdOs092226@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to millert@freebsd.org using -f From: Todd Miller To: Perforce Change Reviews Cc: Subject: PERFORCE change 107563 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Oct 2006 19:33:40 -0000 http://perforce.freebsd.org/chv.cgi?CH=107563 Change 107563 by millert@millert_g5tower on 2006/10/09 19:32:51 Must initialize buf_len before call to sysctlbyname(). Affected files ... .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/src/canonicalize_context.c#3 edit .. //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/src/check_context.c#3 edit Differences ... ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/src/canonicalize_context.c#3 (text+ko) ==== @@ -16,6 +16,7 @@ ssize_t con_len; int ret = -1; + buf_len = sizeof(buf); con_len = strlen(con) + 1; ret = sysctlbyname("security.mac.sebsd.canon_context", buf, &buf_len, con, con_len); ==== //depot/projects/trustedbsd/sedarwin8/policies/sedarwin/libselinux/src/check_context.c#3 (text+ko) ==== @@ -16,6 +16,7 @@ int ret; /* Just check validity, don't care about returned buffer. */ + buf_len = sizeof(buf); con_len = strlen(con) + 1; ret = sysctlbyname("security.mac.sebsd.canon_context", buf, &buf_len, con, con_len);