[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bash sockets: printf \x0a does TCP fragmentation
From: |
Greg Wooledge |
Subject: |
Re: bash sockets: printf \x0a does TCP fragmentation |
Date: |
Mon, 24 Sep 2018 09:05:33 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
On Sat, Sep 22, 2018 at 11:50:17AM +0200, dirk+bash@testssl.sh wrote:
> On 9/22/18 7:30 AM, Bob Proulx wrote:
> > dirk+bash@testssl.sh wrote:
> >> printf -- "$data" >&5 2>/dev/null
> >
> > What happens if $data contains % format strings? What happens if the
> > format contains a sequence such as \c? This looks problematic. This
> > is not a safe programming proctice.
Looking ONLY at this one line, there is an obvious bug, which Bob has
pointed out. It should be
printf %s "$data" >&5 2>/dev/null
> I doubt you can judge on this by just looking at a single line
> of code -- the project has > 18k LoC in bash.
That is utterly horrifying.
I have no comments on the buffering issues. Those have already been
covered.
- Re: bash sockets: printf \x0a does TCP fragmentation, (continued)
- Re: bash sockets: printf \x0a does TCP fragmentation, dirk+bash, 2018/09/25
- Re: bash sockets: printf \x0a does TCP fragmentation, Chet Ramey, 2018/09/25
- Re: bash sockets: printf \x0a does TCP fragmentation, Greg Wooledge, 2018/09/25
- Re: bash sockets: printf \x0a does TCP fragmentation, dirk+bash, 2018/09/25
- Re: bash sockets: printf \x0a does TCP fragmentation, Robert Elz, 2018/09/22
- Re: bash sockets: printf \x0a does TCP fragmentation, Bob Proulx, 2018/09/23
- Re: bash sockets: printf \x0a does TCP fragmentation, Robert Elz, 2018/09/23
- Re: bash sockets: printf \x0a does TCP fragmentation, Bob Proulx, 2018/09/23
- Re: bash sockets: printf \x0a does TCP fragmentation,
Greg Wooledge <=
- Re: bash sockets: printf \x0a does TCP fragmentation, L A Walsh, 2018/09/25
- Re: bash sockets: printf \x0a does TCP fragmentation, Greg Wooledge, 2018/09/25
- Re: bash sockets: printf \x0a does TCP fragmentation, Chet Ramey, 2018/09/25
- Re: bash sockets: printf \x0a does TCP fragmentation, Dirk Wetter, 2018/09/26
- Re: bash sockets: printf \x0a does TCP fragmentation, Chet Ramey, 2018/09/26