Re: [PATCH] pretty: Fix bug in truncation support for %>, %< and %><

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Apr 28, 2013 at 2:43 AM, Ramsay Jones
<ramsay@xxxxxxxxxxxxxxxxxxx> wrote:
> The truncation support was implemented with the assistance of a
> new strbuf function (strbuf_utf8_replace). This function contains
> the following code:
>
>        strbuf_attach(sb_src, strbuf_detach(&sb_dst, NULL),
>                      sb_dst.len, sb_dst.alloc);
>
> Unfortunately, this code is subject to unspecified behaviour. In
> particular, the order of evaluation of the argument expressions
> (along with the associated side effects) is not specified by the
> C standard.

Thanks for noticing and fixing it. What compiler did you use by the way?
--
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]