Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Feb 2010 16:55:08 -0800
From:      Garrett Cooper <yanefbsd@gmail.com>
To:        FreeBSD-Hackers <freebsd-hackers@freebsd.org>
Subject:   read(1) garbage when input redirected from make incorrectly
Message-ID:  <7d6fde3d1002151655q184c8a21k8a0c6c07b9b0ae79@mail.gmail.com>
In-Reply-To: <364299f41002151649y2e4d4120p918759afb1fd8f6c@mail.gmail.com>
References:  <364299f41002151649y2e4d4120p918759afb1fd8f6c@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi Hackers,
=A0 =A0I accidentally reproduced the following after executing read
properly in a pipeline with make:

[garrcoop@garrcoop-fbsd /usr/home/garrcoop]$ read DESTDIR SRCCONF <
/usr/bin/make -V DESTDIR -V SRCCONF
bash: read: `-V': not a valid identifier
[garrcoop@garrcoop-fbsd /usr/home/garrcoop]$ echo $DESTDIR
=A0ELF
[garrcoop@garrcoop-fbsd /usr/home/garrcoop]$ hexdump -C foo
00000000  7f 45 4c 46 01 01 01 0a                           |.ELF....|
00000008
[garrcoop@garrcoop-fbsd /usr/home/garrcoop]$

=A0 =A0Is this an issue to be concerned about apart from cosmetic noise,
i.e. potential buffer access problem? I see the same garbage from
bash/coreutils on RHEL 4.6 as well as read(1) and /bin/sh on FreeBSD
with RELENG_8, so the issue appears to be consistent on multiple
OSes...
Thanks,
-Garrett



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7d6fde3d1002151655q184c8a21k8a0c6c07b9b0ae79>