/bin/sh dumps core with here-document of 8bit text

[ Available lists | Index of freebsd-current | Month of Jul 2000 | Week of 27 Jul 2000 | Raw email | View thread | Wrap long lines | Reply | Tag ]
From
Jun Kuriyama <kuriyama@FreeBSD.org>
Date
27 Jul 2000 20:09:53
Subject
/bin/sh dumps core with here-document of 8bit text
Message-ID
7mr98fq7b4.wl@waterblue.imgsrc.co.jp


[ Hide this part ]
 
I don't know you are the right person to ask, but I found you
committed some of 8bit cleaning in src/bin/sh.

Shell script which contains here-document of 8bit text sometimes dumps
core. For example, please test this script in 4.1 or -current.

#!/bin/sh
cat <<EOF
[8bit text which contains 0x82 character]
EOF

And, if I use 'EOF' instead of EOF, it works fine. Do you have any
idea about this behavior?

After at a glance of sources, 0x82 is used as CTLVAR control
character. I think this should be escaped as CTLESC CTLVAR before
examining variable substitution whether here-docuement is quoted or
not.


--
Jun Kuriyama <kuriyama@FreeBSD.org> // FreeBSD Project


[ Show this part (application/octet-stream) ]

Elapsed time: 0.075 seconds