On 9 November 2015 at 16:52, Gavin Smith <[email protected]> wrote:
> If all it needs is one extra byte in the allocation, we could do:
>
> Index: install-info.c
> ===================================================================
> --- install-info.c      (revision 6758)
> +++ install-info.c      (working copy)
> @@ -1444,7 +1444,7 @@ format_entry (char *name, size_t name_len, char *d
>        if (offset_out + 1 >= allocated_out)
>          {
>            allocated_out = offset_out + 1;
> -          line_out = (char *) realloc ((void *)line_out, allocated_out);
> +          line_out = (char *) realloc ((void *)line_out, allocated_out + 1);
>          }
>
>        if (c == '\n')
>
> I'll commit that (along with a comment saying that it's for a problem
> with strncat) if it works for you.

Done.

Reply via email to