Mercurial > hg > waaad
changeset 362:93e6eaf04b95
Fix segmentation fault
author | Sebastien Decugis <sdecugis@nict.go.jp> |
---|---|
date | Thu, 21 May 2009 10:25:20 +0900 |
parents | fbe54f8d535e |
children | 9d330bd07134 |
files | extensions/radius_gw/rgw_work.c |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/extensions/radius_gw/rgw_work.c Thu May 21 10:15:09 2009 +0900 +++ b/extensions/radius_gw/rgw_work.c Thu May 21 10:25:20 2009 +0900 @@ -106,7 +106,8 @@ /* Recreate a false message to compute the md5 sum. This is very bad design, optimization possible here... */ memset(buf, 0, sizeof(buf)); - CHECK_FCT( rgw_msg_gen(rad, (unsigned char **)&buf, &buflen) ); + key = &buf[0]; /* use key here to avoid declarataion of another var */ + CHECK_FCT( rgw_msg_gen(rad, &key, &buflen) ); /* Get the shared secret associated with this client */ CHECK_FCT( rgw_clients_getkey(cli, &key, &key_len) );