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

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

 



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Mon, 16 Nov 2009, Ales Kozumplik wrote:

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


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@xxxxxxxxxx>
Red Hat / Honolulu, HI

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAksBrcIACgkQ5hsjjIy1VkmVXQCgyH/Xs4HkmCZok+EsdnYKnef7
+H8AnjXOXCZLhwWqD5fWm9yeDLfvU6Ue
=FlGE
-----END PGP SIGNATURE-----

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux