Re: [hackers] [sbase] [PATCH] libutil/unescape: NULL terminate unescaped string

From: Laslo Hunhold <dev_AT_frign.de>
Date: Fri, 24 Mar 2017 10:42:07 +0100

On Tue, 7 Mar 2017 23:10:48 -0800
Michael Forney <mforney_AT_mforney.org> wrote:

Hey Michael,

> In commit 30fd43d7f3b8716054eb9867c835aadc423f652c, unescape was
> simplified significantly, but the new version failed to NULL terminate
> the resulting string.
>
> This causes bad behavior in various utilities, for example tr:
>
> Broken:
>
> $ echo b2 | tr '\142' '\143'
> c3
>
> Fixed:
>
> $ echo b2 | tr '\142' '\143'
> c2
>
> This bug breaks libtool's usage of tr, causing gcc to fail to build
> with sbase.

thanks for spotting this! Pushed.

With best regards

Laslo

-- 
Laslo Hunhold <dev_AT_frign.de>
Received on Fri Mar 24 2017 - 10:42:07 CET

This archive was generated by hypermail 2.3.0 : Fri Mar 24 2017 - 10:48:26 CET