Changeset 4790:c1073581d7c2 in roaraudio for roard


Ignore:
Timestamp:
03/11/11 11:25:22 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added support for long (> sizeof(mes.data)-4) cookies, fixed memory use-after-free bug in roard

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/req.c

    r4780 r4790  
    115115  return -1; 
    116116 
    117  ROAR_INFO("req_on_auth(client=%i,...): authtype=%s(%i)", ROAR_DBG_INFO_VERBOSE, 
    118                            client, roar_autht2str(authmes.type), authmes.type); 
     117 ROAR_INFO("req_on_auth(client=%i,...): authtype=%s(%i), len=%llu bytes", ROAR_DBG_INFO_VERBOSE, 
     118                           client, roar_autht2str(authmes.type), authmes.type, (long long unsigned int)authmes.len); 
    119119 
    120120 ret = auth_client_ckeck(cs, &authmes, &next); 
  • roard/roard.c

    r4789 r4790  
    13741374 struct roar_authfile_key *  key = NULL; 
    13751375 int af_type = ROAR_AUTHFILE_TYPE_AUTO; 
     1376 void * keydata; 
    13761377 
    13771378 if ( type == NULL ) { 
     
    14281429    } 
    14291430 
    1430     if ( auth_addkey_cookie(acclev, key->data, key->len) == -1 ) { 
     1431    keydata = roar_mm_memdup(key->data, key->len); 
     1432 
     1433    if ( keydata == NULL ) { 
     1434     ROAR_WARN("add_authfile(*): Can not allocate memory for key."); 
     1435    } else if ( auth_addkey_cookie(acclev, keydata, key->len) == -1 ) { 
    14311436     ROAR_WARN("add_authfile(*): Can not add key to internal key storage."); 
    14321437    } 
Note: See TracChangeset for help on using the changeset viewer.