From owner-p4-projects@FreeBSD.ORG Mon Mar 13 12:47:49 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 31F0416A41F; Mon, 13 Mar 2006 12:47:49 +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 08BCB16A422 for ; Mon, 13 Mar 2006 12:47:48 +0000 (UTC) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C475E43D48 for ; Mon, 13 Mar 2006 12:47:47 +0000 (GMT) (envelope-from soc-bushman@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k2DCllvj020486 for ; Mon, 13 Mar 2006 12:47:47 GMT (envelope-from soc-bushman@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k2DCllG6020483 for perforce@freebsd.org; Mon, 13 Mar 2006 12:47:47 GMT (envelope-from soc-bushman@freebsd.org) Date: Mon, 13 Mar 2006 12:47:47 GMT Message-Id: <200603131247.k2DCllG6020483@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to soc-bushman@freebsd.org using -f From: soc-bushman To: Perforce Change Reviews Cc: Subject: PERFORCE change 93245 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, 13 Mar 2006 12:47:49 -0000 http://perforce.freebsd.org/chv.cgi?CH=93245 Change 93245 by soc-bushman@soc-bushman_stinger on 2006/03/13 12:47:38 agents error fixed - without (buffer == NULL) check cached crashed while performing actual lookups Affected files ... .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/group.c#5 edit .. //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/services.c#5 edit Differences ... ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/group.c#5 (text+ko) ==== @@ -66,7 +66,7 @@ desired_size += ALIGNBYTES + (mem_size + 1) * sizeof(char *); } - if (desired_size > *buffer_size) { + if ((desired_size > *buffer_size) || (buffer == NULL)) { *buffer_size = desired_size; TRACE_OUT(group_marshal_func); return (NS_RETURN); ==== //depot/projects/soc2005/nsswitch_cached/src/usr.sbin/cached/cached/agents/services.c#5 (text+ko) ==== @@ -69,7 +69,7 @@ (aliases_size + 1); } - if (*buffer_size < desired_size) { + if ((*buffer_size < desired_size) || (buffer == NULL)) { *buffer_size = desired_size; TRACE_OUT(services_marshal_func); return (NS_RETURN);