[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.



On 11/13/2009 08:47 PM, David Cantrell wrote:
-----BEGIN PGP SIGNED MESSAGE-----
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
nfsinstall.c


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.

Ales


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