GNU bug report logs - #50767
28.0.50; Warnings about snprintf in image.c on armv7l

Previous Next

Package: emacs;

Reported by: "Basil L. Contovounesios" <contovob <at> tcd.ie>

Date: Thu, 23 Sep 2021 17:05:01 UTC

Severity: minor

Tags: moreinfo, patch

Found in version 28.0.50

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eli Zaretskii <eliz <at> gnu.org>
To: Alan Third <alan <at> idiocy.org>
Cc: contovob <at> tcd.ie, 50767 <at> debbugs.gnu.org
Subject: bug#50767: 28.0.50; Warnings about snprintf in image.c on armv7l
Date: Fri, 24 Sep 2021 09:41:43 +0300
> Date: Thu, 23 Sep 2021 23:49:37 +0100
> From: Alan Third <alan <at> idiocy.org>
> Cc: 50767 <at> debbugs.gnu.org
> 
> > >> What if xmalloc or snprintf fail?
> > >
> > > Doesn't xmalloc causes some sort of error to occur? I'm not sure.
> > 
> > I think it exits only while Emacs is still initialising itself before
> > entering the top-level command loop, and otherwise frees ballast memory
> > and signals a Lisp error.
> > 
> > At least the second snprintf in svg_load_image does check xmalloc's
> > return value.
> 
> None of the other uses of xmalloc in image.c check the return value
> either, as far as I can see, and I certainly didn't write them all...

AFAIR, there's no need to check the return value of xmalloc, because
it doesn't return if it cannot allocate memory.




This bug report was last modified 3 years and 272 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.