Patch to server list initialization for FreeRADIUS client lib 1.1.6

Alan DeKok aland at deployingradius.com
Wed Apr 28 16:26:05 CEST 2010


Scott Neugroschl wrote:
> In lib/config.c, in set_option_srv(), when the serverlist is allocated, the
> allocated memory
> currently isn't zeroed.  This shouldn't be a problem, as we only search up
> to serv->max, but
> in rc_find_server(), we check to see if {acct,auth}servers->secret[i] is
> NULL.  If we don't
> zero out the SERVER structure upon allocation, this value could be non-zero,
> and the test for
> NULL could fail, leading to segfault.
> 
> The attached patch to lib/config.c addresses this issue by zeroing out the
> SERVER structure
> upon allocation.

  Added, thanks.

  Alan DeKok.



More information about the Freeradius-Devel mailing list