From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <80ce6d908233d7814aadd0b75c098154@plan9.bell-labs.com> From: presotto@plan9.bell-labs.com To: 9fans@cse.psu.edu Subject: Re: [9fans] a bug in freopen MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-mcxendzfsnxicyatyomrzqidni" Date: Mon, 5 Aug 2002 22:38:11 -0400 Topicbox-Message-UUID: d8786a62-eaca-11e9-9e20-41e7f4b1d025 This is a multi-part message in MIME format. --upas-mcxendzfsnxicyatyomrzqidni Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Rewritten and tested to my usual standards, i.e., it compiles and my one test didn't abort. --upas-mcxendzfsnxicyatyomrzqidni Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Mon Aug 5 08:30:15 EDT 2002 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Mon Aug 5 08:30:14 EDT 2002 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.30.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 6C39519991; Mon, 5 Aug 2002 08:30:06 -0400 (EDT) Delivered-To: 9fans@cse.psu.edu Received: from plan9.cs.bell-labs.com (ampl.com [204.178.31.2]) by mail.cse.psu.edu (CSE Mail Server) with SMTP id 2E9D519A55 for <9fans@cse.psu.edu>; Mon, 5 Aug 2002 08:29:49 -0400 (EDT) Message-ID: From: presotto@closedmind.org To: 9fans@cse.psu.edu Subject: Re: [9fans] a bug in freopen MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="upas-npayuyxvaehamdqzxqzoaajxjn" Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Aug 2002 08:29:48 -0400 This is a multi-part message in MIME format. --upas-npayuyxvaehamdqzxqzoaajxjn Content-Disposition: inline Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit I'll fix it. It is really crappy code. Thanks. --upas-npayuyxvaehamdqzxqzoaajxjn Content-Type: message/rfc822 Content-Disposition: inline Received: from plan9.cs.bell-labs.com ([135.104.9.2]) by plan9; Mon Aug 5 06:14:17 EDT 2002 Received: from mail.cse.psu.edu ([130.203.4.6]) by plan9; Mon Aug 5 06:14:15 EDT 2002 Received: from psuvax1.cse.psu.edu (psuvax1.cse.psu.edu [130.203.30.6]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 7EF5919A2C; Mon, 5 Aug 2002 06:14:06 -0400 (EDT) Delivered-To: 9fans@cse.psu.edu Received: from mercury.bath.ac.uk (mercury.bath.ac.uk [138.38.32.81]) by mail.cse.psu.edu (CSE Mail Server) with ESMTP id 4D94B19991 for <9fans@cse.psu.edu>; Mon, 5 Aug 2002 06:13:13 -0400 (EDT) Received: from news by mercury.bath.ac.uk with local (Exim 3.12 #1) id 17bedh-0003v1-00 for 9fans@cse.psu.edu; Mon, 05 Aug 2002 10:59:01 +0100 Received: from GATEWAY by bath.ac.uk with netnews for 9fans@cse.psu.edu (9fans@cse.psu.edu) To: 9fans@cse.psu.edu From: Saroj Mahapatra Message-ID: <6d3220b4.0208031631.2e8fd04e@posting.google.com> Organization: http://groups.google.com/ Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Subject: [9fans] a bug in freopen Sender: 9fans-admin@cse.psu.edu Errors-To: 9fans-admin@cse.psu.edu X-BeenThere: 9fans@cse.psu.edu X-Mailman-Version: 2.0.11 Precedence: bulk Reply-To: 9fans@cse.psu.edu List-Id: Fans of the OS Plan 9 from Bell Labs <9fans.cse.psu.edu> List-Archive: Date: Mon, 5 Aug 2002 09:55:49 GMT There is a bug in freopen in that it checks mode[1] and mode[2] without first checking if mode[0] is NULL char. So it may access invalid memory location. Thank you, Saroj Mahapatra --upas-npayuyxvaehamdqzxqzoaajxjn-- --upas-mcxendzfsnxicyatyomrzqidni--