From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18469 invoked by alias); 19 Sep 2003 02:32:37 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 18461 invoked from network); 19 Sep 2003 02:32:36 -0000 Received: from unknown (HELO smtp-relay-8.adobe.com) (192.150.22.8) by sources.redhat.com with SMTP; 19 Sep 2003 02:32:36 -0000 Received: from inner-relay-3.corp.adobe.com (inner-relay-3 [153.32.251.51]) by smtp-relay-8.adobe.com (8.12.9/8.12.9) with ESMTP id h8J2W9hA017455; Thu, 18 Sep 2003 19:32:14 -0700 (PDT) Received: from iplan-mn (iplan-mn.corp.adobe.com [130.248.25.5]) by inner-relay-3.corp.adobe.com (8.12.9/8.12.9) with ESMTP id h8J2W8ps017862; Thu, 18 Sep 2003 19:32:08 -0700 (PDT) Received: from mn-eljaypc.adobe.com ([130.248.182.25]) by iplan-mn.corp.adobe.com (iPlanet Messaging Server 5.2 Patch 1 (built Aug 19 2002)) with ESMTP id <0HLF007EDWDILR@iplan-mn.corp.adobe.com>; Thu, 18 Sep 2003 21:32:07 -0500 (CDT) Date: Fri, 19 Sep 2003 02:32:00 -0000 From: Eljay Love-Jensen Subject: Re: Newbie problem: Address out of bounds In-reply-to: <20030919014440.66527.qmail@web41404.mail.yahoo.com> X-Sender: eljay@iplan-mn.corp.adobe.com To: Andre Kirchner , gcc-help@gcc.gnu.org Message-id: <5.2.1.1.0.20030918212753.01a7aa48@iplan-mn.corp.adobe.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT X-SW-Source: 2003-09/txt/msg00222.txt.bz2 Hi Andre, Does getLine '\0' terminate the line? Does getLine assure that not to overrun the theLine's buffer size, including the terminator? (And, if so, how does getLine know how big theLine's buffer is?) The bzero function is rather non-portable, as it is not a required part of ANSI or System V. (I think that harkens back to the days of BCPL.) A portable alternative is memset(ptr, 0x00, 256); instead. HTH, --Eljay