From owner-freebsd-current Thu Mar 23 20:57:25 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id UAA13268 for current-outgoing; Thu, 23 Mar 1995 20:57:25 -0800 Received: from sovcom.kiae.su (sovcom.kiae.su [144.206.136.1]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id UAA13262; Thu, 23 Mar 1995 20:57:22 -0800 Received: by sovcom.kiae.su id AA18286 (5.65.kiae-2 ); Fri, 24 Mar 1995 07:56:31 +0300 Received: by sovcom.KIAE.su (UUMAIL/2.0); Fri, 24 Mar 95 07:56:31 +0300 Received: (from ache@localhost) by astral.msk.su (8.6.8/8.6.6) id HAA03153; Fri, 24 Mar 1995 07:51:27 +0300 To: current@FreeBSD.org, "Garrett A. Wollman" Cc: dima@FreeBSD.org Message-Id: Organization: Olahm Ha-Yetzirah Date: Fri, 24 Mar 1995 07:51:26 +0300 X-Mailer: Mail/@ [v2.32 FreeBSD] From: "Andrey A. Chernov, Black Mage" X-Class: Fast Subject: ATTENTION: VERY serious hidden bug in gethostbyname/gethostbyaddr! Lines: 14 Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 724 Sender: current-owner@FreeBSD.org Precedence: bulk When program uses strtok() and call gethostbyname/addr after it, strtok() memory becomes corrupted, because private function init_services() from gethostnamaddr.c module uses strtok() too! AND ONLY ONE STRTOK PARSER MAY BE ACTIVE AT ONCE. Now init_services() strtok() corrupts program strtok() internal variables. Garrett, please, get rid of strtok() in init_services()! Currently this bug strongly affects at least tcp_wrapper. -- Andrey A. Chernov : And I rest so composedly, /Now, in my bed, ache@astral.msk.su : That any beholder /Might fancy me dead - FidoNet: 2:5020/230.3 : Might start at beholding me, /Thinking me dead. RELCOM Team,FreeBSD Team : E.A.Poe From "For Annie" 1849