bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#50767: 28.0.50; Warnings about snprintf in image.c on armv7l


From: Alan Third
Subject: bug#50767: 28.0.50; Warnings about snprintf in image.c on armv7l
Date: Fri, 15 Oct 2021 18:26:11 +0100

On Thu, Oct 14, 2021 at 04:43:05PM +0100, Basil L. Contovounesios wrote:
> Alan Third [2021-10-04 22:45 +0100] wrote:
> 
> > On Thu, Sep 23, 2021 at 11:49:37PM +0100, Alan Third wrote:
> >> On Thu, Sep 23, 2021 at 11:38:06PM +0100, Basil L. Contovounesios wrote:
> >> > ...which would mean this only holds in the common case that
> >> > face_font_size has fewer than 5 digits, right?
> >> 
> >> Looks that way.
> >> 
> >> I suppose in this particular case we could limit the font size to a
> >> maximum of 9999 or something, but surely there's a better way of
> >> calculating string sizes?
> >
> > I've implemented a pretty basic check so we shouldn't accidentally
> > overrun the buffer. See attached.
> 
> Thanks, and sorry for the late reply.  I haven't had a chance to compile
> this on armv7l yet, but I should be able to later today or tomorrow.  It
> continues to compile without warnings on x86_64.

I'm not sure it'll silence the warnings, as I'm not sure what we need
to do for that, but it should at least reduce the chances of an
overflow.
-- 
Alan Third





reply via email to

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