NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
bin/49177: usr.bin/uuencode is not functioning correctly, there are some problems in the source code.
>Number: 49177
>Category: bin
>Synopsis: usr.bin/uuencode is not functioning correctly, there are some
>problems in the source code.
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: bin-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Sep 06 15:15:00 +0000 2014
>Originator: Sky Liu
>Release: 6.1.4
>Organization:
Beijiang Senior School
>Environment:
NetBSD foobar 6.1.4 NetBSD 6.1.4 (EEEPC900) #2: Sun Jun 29 02:00:06 CEST 2014
>Description:
I've read through the code carefully, and i found the following problems:
it says "usage: %s [-m] [inputfile] outputname\n", right?
despite of the "-m" , it means if i pass two arguments to it, the first one
will be treated as input and the second one will be treated as output
and if i pass one argument to it , stdin will be treated as input and the only
argument will be the output right?
but whatever your arguments are, the output will alway be stdout
according to the code , it uses putchar() to print things but there isn't any
freopen(*,*,stdout) through the whole file
according to my experiments and oservations this is what it actually does:
if i give only one argument to it, it will use stdin and stdout as input and
output
if i give two arguments to it, it will take the second one as input and print
all the things to the screen
>How-To-Repeat:
if YOU give only one argument to it, it will use stdin and stdout as input and
output
if you give two arguments to it, it will take the second one as input and print
all the things to the screen
which is not what it should be
>Fix:
it's not hard to fix it. making some small changes to the code(add freopen(),
or replace putchar() with fprintf()) and it will be alright. And I would like
to help. Please inform me if you figure out what to do next, thanks.
Home |
Main Index |
Thread Index |
Old Index