From owner-p4-projects@FreeBSD.ORG Tue Apr 26 11:22:42 2005 Return-Path: Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 79C3716A4D0; Tue, 26 Apr 2005 11:22:42 +0000 (GMT) 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 3B6FC16A4CE for ; Tue, 26 Apr 2005 11:22:42 +0000 (GMT) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 243CF43D1D for ; Tue, 26 Apr 2005 11:22:42 +0000 (GMT) (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id j3QBMgoQ095652 for ; Tue, 26 Apr 2005 11:22:42 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id j3QBMcOj095648 for perforce@freebsd.org; Tue, 26 Apr 2005 11:22:38 GMT (envelope-from bb+lists.freebsd.perforce@cyrus.watson.org) Date: Tue, 26 Apr 2005 11:22:38 GMT Message-Id: <200504261122.j3QBMcOj095648@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to bb+lists.freebsd.perforce@cyrus.watson.org using -f From: Robert Watson To: Perforce Change Reviews Subject: PERFORCE change 75997 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2005 11:22:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=75997 Change 75997 by rwatson@rwatson_paprika on 2005/04/26 11:22:22 Make sure to properly initialize 'retval' for the success case when writing an audit record to a buffer. Remove unused 'dptr', frobbing the internals of records occurs only in au_assemble() now. Affected files ... .. //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#8 edit Differences ... ==== //depot/projects/trustedbsd/openbsm/libbsm/bsm_audit.c#8 (text+ko) ==== @@ -259,7 +259,6 @@ int au_close(int d, int keep, short event) { au_record_t *rec; - u_char *dptr; size_t tot_rec_size; int retval = 0; @@ -322,6 +321,7 @@ return (-1); } + retval = 0; tot_rec_size = rec->len + BSM_HEADER_SIZE + BSM_TRAILER_SIZE; if ((tot_rec_size > MAX_AUDIT_RECORD_SIZE) || (tot_rec_size > *buflen)) {