On Sat, Sep 22, 2018 at 11:50:17AM +0200, dirk+b...@testssl.sh wrote:
> On 9/22/18 7:30 AM, Bob Proulx wrote:
> > dirk+b...@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.

Reply via email to