# HG changeset patch # User Sebastien Decugis # Date 1284529555 -32400 # Node ID d2be8862874792d9fd2117fb6a646236005fa1e8 # Parent 27f833e7f9c465efefbf6dbb4b0ca87e6aef82ac Bug fix diff -r 27f833e7f9c4 -r d2be88628747 extensions/app_radgw/radius.c --- a/extensions/app_radgw/radius.c Wed Sep 15 14:41:50 2010 +0900 +++ b/extensions/app_radgw/radius.c Wed Sep 15 14:45:55 2010 +0900 @@ -590,7 +590,7 @@ size_t *temp_ps = NULL; int n, new_n = 0, p = 0; - CHECK_MALLOC( temp_ps = calloc(temp_msg->ps_nb, sizeof(size_t *)) ); + CHECK_MALLOC( temp_ps = calloc(temp_msg->ps_nb, sizeof(size_t)) ); /* Move all the Proxy-State attributes into the temp_ps array */ for (n=0; n < temp_msg->radius.attr_used; n++) { @@ -606,7 +606,7 @@ temp_msg->ps_first = new_n; /* And back into the array */ - memcpy(temp_msg->radius.attr_pos + new_n, temp_ps, p * sizeof(size_t *)); + memcpy(temp_msg->radius.attr_pos + new_n, temp_ps, p * sizeof(size_t)); free(temp_ps); }