[PATCH v2 1/1] write_queue: Avoid possible use-after-free if fd is read-/writable

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Holger Hans Peter Freyther holger at freyther.de
Thu Jun 12 10:19:49 UTC 2014


On Tue, Jun 10, 2014 at 10:27:52AM +0200, Pablo Neira Ayuso wrote:

> > +#define HANDLE_BAD_FD(rc, label) \
> > +	do { \
> > +		if (rc == -EBADFD) \
> > +			goto label; \
> > +	} while (0);
> 
> Do we really get anything good with this macro? This checking is only
> required in three places in this patch.

What is the argument against having this macro? readability?




More information about the OpenBSC mailing list