Commit report for master branch

Alan DeKok aland at deployingradius.com
Fri Mar 22 13:59:07 CET 2013


Brian Candler wrote:
> #define VERIFY(_x) _x=talloc_get_type(_x, VALUE_PAIR)
> 
> and my understanding is that if the type is wrong, _x will be set to null.

  Yes.

> However the code then goes ahead and indirects through vp without first
> checking if vp is null, and there are lots of instances of this.
> 
> Is that intentional? 

  No.

  My $0.02 is that if something goes that wrong, the only thing you can
do is to exit().  Arran wants to print out information about the "wrong"
context.  But if memory has been corrupted, all bets are off.

> I guess if all you want is a segfault on type error
> then it's OK (but in that case I don't see why you don't use
> talloc_get_type_abort)

  You would.  It's what I had originally.

  The change is wrong.  My thoughts are here:

  http://24.media.tumblr.com/tumblr_lqao3admCI1qzmcqxo1_400.gif

  Alan DeKok.


More information about the Freeradius-Devel mailing list