From owner-freebsd-bugs Sat Jul 27 16:30: 8 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A27A437B400 for ; Sat, 27 Jul 2002 16:30:02 -0700 (PDT) Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 026FD43E4A for ; Sat, 27 Jul 2002 16:30:02 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.4/8.12.4) with ESMTP id g6RNU1JU071045 for ; Sat, 27 Jul 2002 16:30:01 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.4/8.12.4/Submit) id g6RNU1PU071044; Sat, 27 Jul 2002 16:30:01 -0700 (PDT) Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id AC47E37B400 for ; Sat, 27 Jul 2002 16:20:06 -0700 (PDT) Received: from www.freebsd.org (www.FreeBSD.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 0916543E4A for ; Sat, 27 Jul 2002 16:20:06 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.4/8.12.4) with ESMTP id g6RNK5OT057816 for ; Sat, 27 Jul 2002 16:20:05 -0700 (PDT) (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.4/8.12.4/Submit) id g6RNK5ix057815; Sat, 27 Jul 2002 16:20:05 -0700 (PDT) Message-Id: <200207272320.g6RNK5ix057815@www.freebsd.org> Date: Sat, 27 Jul 2002 16:20:05 -0700 (PDT) From: "M.J.Kouache" To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: kern/41063: Typo Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 41063 >Category: kern >Synopsis: Typo >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: Sat Jul 27 16:30:01 PDT 2002 >Closed-Date: >Last-Modified: >Originator: M.J.Kouache >Release: MAIN & RELENG_4 >Organization: >Environment: unimportant >Description: There's a nasty typo in sys/dev/ata/atapi-all.c. First look at the diff -c I have submitted as the fix, especially notice that the buffer size has been increased. If I really need to explain more, then read on, (if not, goodbye and thanks for your time :-) Version 1.10 of atapi-all.c in the MAIN source branch included a change in the error message, the new one is longer than the original and is now too large for the allocated buffer. This was introduced 3 years ago, and no-one's noticed yet, hence the non-critical severity of this pr. At least this bug isn't as bad as the evil "<<" where it should be ">>" typo in the ata 48 bit addressing code, the fix to which has still not appeared in 4-STABLE yet btw. >How-To-Repeat: >Fix: *** atapi-all.c Sat Jul 27 21:51:17 2002 --- atapi-all.fixed.c Sat Jul 27 21:51:57 2002 *************** *** 35,41 **** case 0xbd: return ("MECH_STATUS"); case 0xbe: return ("READ_CD"); default: { ! static int8_t buffer[16]; sprintf(buffer, "unknown CMD (0x%02x)", cmd); return buffer; } --- 35,41 ---- case 0xbd: return ("MECH_STATUS"); case 0xbe: return ("READ_CD"); default: { ! static int8_t buffer[20]; sprintf(buffer, "unknown CMD (0x%02x)", cmd); return buffer; } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message