Navigation


Changeset 540:23736ebcbfbb in freeDiameter


Ignore:
Timestamp:
Sep 11, 2010, 9:21:16 AM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Previous commit provked a segfault, this fixes it.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_radgw/radius.c

    r539 r540  
    357357                    return -1;
    358358            }
    359         }
    360         msg->hdr->length = htons(msg->buf_used);
    361         os_memcpy(msg->hdr->authenticator, req_authenticator,
    362                   sizeof(msg->hdr->authenticator));
    363         hmac_md5(secret, secret_len, msg->buf, msg->buf_used,
    364                  (u8 *) (attr + 1));
     359            msg->hdr->length = htons(msg->buf_used);
     360            os_memcpy(msg->hdr->authenticator, req_authenticator,
     361                      sizeof(msg->hdr->authenticator));
     362            hmac_md5(secret, secret_len, msg->buf, msg->buf_used,
     363                     (u8 *) (attr + 1));
     364        } else {
     365            msg->hdr->length = htons(msg->buf_used);
     366        }
    365367
    366368        /* ResponseAuth = MD5(Code+ID+Length+RequestAuth+Attributes+Secret) */
Note: See TracChangeset for help on using the changeset viewer.