Received: from biscayne-one-station.mit.edu (BISCAYNE-ONE-STATION.MIT.EDU [18.7.7.80]) by krbdev.mit.edu (8.9.3p2) with ESMTP id VAA06934; Fri, 3 Dec 2004 21:19:06 -0500 (EST) Received: from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by biscayne-one-station.mit.edu (8.12.4/8.9.2) with ESMTP id iB42J5aC012456; Fri, 3 Dec 2004 21:19:05 -0500 (EST) Received: from [18.18.1.76] (KEN-WIRELESS.MIT.EDU [18.18.1.76]) (authenticated bits=0) (User authenticated as raeburn@ATHENA.MIT.EDU) by outgoing.mit.edu (8.12.4/8.12.4) with ESMTP id iB42J31U010469 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT); Fri, 3 Dec 2004 21:19:04 -0500 (EST) In-Reply-To: References: MIME-Version: 1.0 (Apple Message framework v619) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: Content-Transfer-Encoding: 7bit Cc: krb5-prs@mit.edu From: Ken Raeburn Subject: Re: [krbdev.mit.edu #2786] dead code in init_common() causes malloc(0) Date: Fri, 3 Dec 2004 21:19:03 -0500 To: rt@krbdev.mit.edu X-Mailer: Apple Mail (2.619) X-Scanned-BY: MIMEDefang 2.42 RT-Send-Cc: X-RT-Original-Encoding: us-ascii Content-Length: 398 I don't think the code is doing anything actually invalid according to the C-1990 spec (which we're assuming compliance to). It allows malloc(0) calls (returning either NULL or a unique pointer), and memcpy shouldn't be reading or storing anything if the length is zero. Nevertheless, if it's always a null pointer and zero length, it is kind of silly for us to have those calls there. Ken