Date: Tue, 5 Oct 1999 18:43:37 +0300 (EEST) From: netch@lucky.net (Valentin Nechayev) To: FreeBSD-gnats-submit@freebsd.org Subject: bin/14142: sendmail: mci.c: bad pointer conversion in debug print Message-ID: <199910051543.SQU07564@aleph.carrier.kiev.ua>
next in thread | raw e-mail | index | archive | help
>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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910051543.SQU07564>
