Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11562
| Path | csiph.com!xmission!news.glorb.com!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Eric Blake <eblake@redhat.com> |
| Newsgroups | gnu.bash.bug |
| Subject | [PATCH] input: fix logic bug that breaks on O_TEXT systems |
| Date | Thu, 24 Sep 2015 15:47:29 -0600 |
| Lines | 33 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.1763.1443131261.19560.bug-bash@gnu.org> (permalink) |
| NNTP-Posting-Host | lists.gnu.org |
| X-Trace | usenet.stanford.edu 1443131262 7197 208.118.235.17 (24 Sep 2015 21:47:42 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| To | bug-bash@gnu.org |
| Envelope-to | bug-bash@gnu.org |
| X-Mailer | git-send-email 2.4.3 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1443131254; bh=UF1/hkxPCtQCAJUJoHxUnEZa0qFQXYAi99ArX0R8RdY=; h=Received:Received:From:To:Subject:Date:Message-Id; b=LrczIdAwsB1yvz9dJt1q0UiTqxcwthYi3wLna8Cl4W8U/QfnGjxaDBP0elsL88OOz JJIFgMmMKFyJia1o/1pWniFObxc6mS2fqYMEqs3NQmk8rSKCGCimXI+PFCaDX1eH7W PPbOcQ9EVGr/BCh2yCtvPlpYxMKFFDm2T86ch0cy1kTsgAk8r6LfAsO9QsvpQchEMO 8mlC0qqpSlBrQOSH5QSkii1o/m3LZKhZ2LaJUrIlTo6qE+a5HWX77ovgu7ks7ejbYu IGe++R7tFDpIu2fA63Pg0qc/ubk0cZxX+jW5tWN3sdMNDsdHupNy4XMTAkXrMFoFZ5 iwp6CdGjKYBLA== |
| X-detected-operating-system | by eggs.gnu.org: Genre and OS details not recognized. |
| X-Received-From | 96.114.154.167 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.14 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:11562 |
Show key headers only | View raw
The bash-20101229 snapshot introduced an attempt to incorporate
some patches that were previously used downstream by Cygwin
with regards to managing scripts read with O_TEXT mode (where
lseek() sees different offsets than the number of bytes read,
because the system is converting physical '\r\n' into logical
'\n'). But it introduced a typo, using O_TEXT where it meant
to use B_TEXT, with the result that scripts read in text mode
would seek to the wrong location.
Thanks to Jeff Downs for helping me find the typo.
Signed-off-by: Eric Blake <eblake@redhat.com>
---
input.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/input.c b/input.c
index 2a9ca26..308b87e 100644
--- a/input.c
+++ b/input.c
@@ -205,7 +205,7 @@ make_buffered_stream (fd, buffer, bufsize)
if (bufsize == 1)
bp->b_flag |= B_UNBUFF;
if (O_TEXT && (fcntl (fd, F_GETFL) & O_TEXT) != 0)
- bp->b_flag |= O_TEXT;
+ bp->b_flag |= B_TEXT;
return (bp);
}
--
2.4.3
Back to gnu.bash.bug | Previous | Next | Find similar
[PATCH] input: fix logic bug that breaks on O_TEXT systems Eric Blake <eblake@redhat.com> - 2015-09-24 15:47 -0600
csiph-web