[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] segfault in texinfo-6.1
From: |
Gavin Smith |
Subject: |
Re: [PATCH] segfault in texinfo-6.1 |
Date: |
Mon, 21 Mar 2016 07:48:32 +0000 |
On 20 March 2016 at 19:21, Thomas Klausner <address@hidden> wrote:
> I've just debugged a segfault I encountered with texinfo-6.1 on
> NetBSD-7.99.26/amd64 when translating some files that lilypond-2.18.2
> provides
> (http://download.linuxaudio.org/lilypond/sources/v2.18/lilypond-2.18.2.tar.gz).
>
> I tracked this down to code that calls mbrlen but doesn't check its
> return value, which might be -1. In the case I see, it indeed is -1 --
> and that gets passed as argument to realloc (which is fine, because it
> reduces the buffer size) and then memcpy, which breaks.
>
> I've attached the patch I use locally. Please check if the handling of
> -1 looks reasonable.
>
> I've also fixed two typos in comments while there.
Thanks a lot for tracking this down!