From owner-freebsd-current@FreeBSD.ORG Thu Jul 14 19:46:45 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CF82616A41C for ; Thu, 14 Jul 2005 19:46:45 +0000 (GMT) (envelope-from arr@watson.org) Received: from fledge.watson.org (fledge.watson.org [204.156.12.50]) by mx1.FreeBSD.org (Postfix) with ESMTP id C133143D46 for ; Thu, 14 Jul 2005 19:46:42 +0000 (GMT) (envelope-from arr@watson.org) Received: from fledge.watson.org (localhost.watson.org [127.0.0.1]) by fledge.watson.org (8.13.3/8.13.3) with ESMTP id j6EJkr2V041520 for ; Thu, 14 Jul 2005 15:46:53 -0400 (EDT) (envelope-from arr@watson.org) Received: from localhost (arr@localhost) by fledge.watson.org (8.13.3/8.13.3/Submit) with ESMTP id j6EJkrfL041517 for ; Thu, 14 Jul 2005 15:46:53 -0400 (EDT) (envelope-from arr@watson.org) X-Authentication-Warning: fledge.watson.org: arr owned process doing -bs Date: Thu, 14 Jul 2005 15:46:53 -0400 (EDT) From: "Andrew R. Reiter" To: freebsd-current@freebsd.org In-Reply-To: <20050629145451.J85841@fledge.watson.org> Message-ID: <20050714154617.F41494@fledge.watson.org> References: <20050629145451.J85841@fledge.watson.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Subject: Re: [CFT] NDIS optional header length related fixups X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 14 Jul 2005 19:46:46 -0000 Due to a lack of response from most parties, I created a PR for the below. It can be viewed at: http://www.freebsd.org/cgi/query-pr.cgi?pr=83477 Thanks, Andrew On Wed, 29 Jun 2005, Andrew R. Reiter wrote: :Calling NDIS -CURRENT users, : :Attached is a patch that should fix any possible issues with mis-calculating :offsets or sizes when dealing with anything 'image_optional_header' related in :the PE loading code. The reason for the patch is that the optional header can :have a varying length due to the lack of requiring the existence of all the :'image_data_directory's to exist within a binary. As far as I can tell, most :drivers tend to include all, but due to the basic idea that there can be less :than IMAGE_DIRECTORY_ENTRIES_MAX data directories in the optional header, we :should at least make an attempt at preemptively catch any bugs that might arise :due to improper pointer calculation. : :If you could, please give it a run in your tree! : :The patch is also located at: : http://www.watson.org/~arr/ndis_opthdrsz.diff : :I guess let me know if anyone has any problems with this working (or other). : :Cheers, :Andrew : :-- :Andrew R. Reiter :arr@watson.org -- Andrew R. Reiter arr@watson.org