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

Re: [master] Introduces CHECK_ASPRINTF macro that checks asprintfs return value and terminates program in OOM scenarios.

Hash: SHA1

On Mon, 16 Nov 2009, Ales Kozumplik wrote:

On 11/13/2009 08:47 PM, David Cantrell wrote:
Hash: SHA1

I'm personally not a fan of using macros for more than constant values.
However, I can see this helping guarantee correct asprintf() usage. I would
like to see:

1) The alignment of "\" on the ends of the macro lines corrected.

2) All asprintf() usages throughout loader changed, not just those in

Hi David,

I just sent the new patch complying with your requests. I left the old asprintf() calls in places where replacing them with the macro would change the current behavior (e.g. where some error code is returned from the function instead of aborting) --- this was the case with 15 out of 87 asprintf() calls. I however think that those cases should gradually also be replaced with the terminating macro.

If there are no more objections I am going to push the patch to master after I verify that I can build it.


Sounds good to me.  The revised patch looks good.

And yes, please do make sure you do a local build and boot verification.
Building is one thing, but grab the new loader and drop it in an initrd.img
and make sure you can boot up and perform an install.

- -- David Cantrell <dcantrell redhat com>
Red Hat / Honolulu, HI

Version: GnuPG v1.4.10 (GNU/Linux)


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