[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: |
Eli Zaretskii |
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@idiocy.org>
> Cc: 50767@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.