bug-mes
[Top][All Lists]
Advanced

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

Re: [PATCH] ntoab: Fix buffer underflow with large integer.


From: Janneke Nieuwenhuizen
Subject: Re: [PATCH] ntoab: Fix buffer underflow with large integer.
Date: Sun, 21 Apr 2024 14:37:05 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

Michael Forney writes:

Hello Michael,

> With base == 8, -2^63 is converted as -1000000000000000000000, which
> is 24 bytes long (including terminating nul), so we need at least
> this much space in the __itoa_buf.

Nice catch!  Wonder how this got unnoticed for so long!

> * lib/mes/ntoab.c (ntoab): Allocate enough space for longest string,
>   and update assert with lowest possible base. Don't decrement
>   pointer below start of buffer, even temporarily.

And a beautiful commit message, thanks!  We use strict GNU style which
does not use the leading space on the hanging lines, so I removed those.
Also, I added your copyright.

Thanks a lot!  Pushed to `wip' for the upcoming 0.26.1 release.

Greetings,
Janneke

-- 
Janneke Nieuwenhuizen <janneke@gnu.org>  | GNU LilyPond https://LilyPond.org
Freelance IT https://www.JoyOfSource.com | AvatarĀ® https://AvatarAcademy.com



reply via email to

[Prev in Thread] Current Thread [Next in Thread]