From owner-freebsd-bugs Tue Oct 9 1:10: 6 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 4BCFF37B409 for ; Tue, 9 Oct 2001 01:10:01 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f998A1n06889; Tue, 9 Oct 2001 01:10:01 -0700 (PDT) (envelope-from gnats) Received: from abovenet.chime.com (abovenet.chime.com [216.200.125.135]) by hub.freebsd.org (Postfix) with ESMTP id 53DCE37B401 for ; Tue, 9 Oct 2001 01:03:07 -0700 (PDT) Received: (from falcon@localhost) by abovenet.chime.com (8.11.6/8.11.6) id f99837F39888; Tue, 9 Oct 2001 01:03:07 -0700 (PDT) (envelope-from falcon) Message-Id: <200110090803.f99837F39888@abovenet.chime.com> Date: Tue, 9 Oct 2001 01:03:07 -0700 (PDT) From: "jon r. luini" Reply-To: "jon r. luini" To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: bin/31156: uuencode should pad with nulls instead of random garbage 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: 31156 >Category: bin >Synopsis: uuencode should pad with nulls instead of random garbage >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Oct 09 01:10:01 PDT 2001 >Closed-Date: >Last-Modified: >Originator: jon r. luini >Release: FreeBSD 4.4-RELEASE i386 >Organization: chime interactive >Environment: System: FreeBSD abovenet.chime.com 4.4-RELEASE FreeBSD 4.4-RELEASE #0: Fri Sep 21 01:25:55 PDT 2001 falcon@newbie.chime.com:/usr/obj/usr/src/sys/CHIME i386 >Description: when uuencode's input is not a multiple of 4, garbage is used to pad it out, according to the doc. it's much more useful to pad with nulls since it provides consistent output when compared against another implementation. >How-To-Repeat: write your own version of uuencode which doesn't use un-initialized data and compare the output of both on an input data which isn't a multiple of 4 bytes in length. >Fix: clear the buffer before reading into it each iteration of the loop, or if you prefer, manually assign nulls only when necessary. >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message