From owner-freebsd-bugs Tue Oct 5 8:50: 8 1999 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.ORG [204.216.27.21]) by hub.freebsd.org (Postfix) with ESMTP id A27AF150B0 for ; Tue, 5 Oct 1999 08:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id IAA52073; Tue, 5 Oct 1999 08:50:01 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from aleph.carrier.kiev.ua (aleph.carrier.kiev.ua [193.193.193.3]) by hub.freebsd.org (Postfix) with ESMTP id 9B81014D10 for ; Tue, 5 Oct 1999 08:43:48 -0700 (PDT) (envelope-from netch@aleph.carrier.kiev.ua) Received: (from netch@localhost) by aleph.carrier.kiev.ua (8.9.3-lucky-netch-pl10/8.9.3) id SQU07564; Tue, 5 Oct 1999 18:43:37 +0300 (EEST) (envelope-from netch) Message-Id: <199910051543.SQU07564@aleph.carrier.kiev.ua> Date: Tue, 5 Oct 1999 18:43:37 +0300 (EEST) From: netch@lucky.net (Valentin Nechayev) Reply-To: netch@lucky.net To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/14142: sendmail: mci.c: bad pointer conversion in debug print Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >Number: 14142 >Category: bin >Synopsis: sendmail: mci.c: bad pointer conversion in debug print >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Oct 5 08:50:01 PDT 1999 >Closed-Date: >Last-Modified: >Originator: Valentin Nechayev >Release: FreeBSD 3.3-STABLE alpha >Organization: Lucky Net Ltd. >Environment: FreeBSD 3.3-STABLE on Alpha >Description: The following piece of mci_dump() uses bad conversion: snprintf(p, SPACELEFT(buf, p), "MCI@%lx: ", sizeof(void *) == sizeof(u_long) ? (u_long)(void *)mci : (u_long)(u_int)(void *)mci); On Alpha architecture, conversion from void* to u_int loses significant bits. These conversions are FreeBSD-specific; original Allman's sendmail does not contain them. >How-To-Repeat: Read and compile the code ;) >Fix: Convert to ptrdiff_t instead of u_int (?) >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message