Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <lhuo6ufd9kj.fsf@fweimer-systemversion.sttgart.csb>
Date: Sun, 22 Jun 2025 18:29:00 +0200
From: Florian Weimer <fweimer@...hat.com>
To: Rich Felker <dalias@...c.org>
Cc: Alejandro Colomar <alx@...nel.org>,  musl@...ts.openwall.com
Subject: Re: Bug in reallocf(3) when calling realloc(3)

* Rich Felker:

> Yes this is true. realloc returning null *always* indicates failure
> (and accordingly, memory has not been freed) in our past and current
> implementations, and indeed it can fail when resizing down (to zero or
> otherwise).

(limited Cc: list)

What's the rationale for that?  Wouldn't it better not to honor the
resize request at all?  The application might be able to continue to run
if no error is reported (although it's of course likely that it will
encounter failing fresh allocation soon after that).

Thanks,
Florian

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.