Navigation



Ignore:
Timestamp:
Oct 20, 2010, 3:37:49 PM (14 years ago)
Author:
Souheil Ben Ayed <souheil@tera.ics.keio.ac.jp>
Branch:
default
Phase:
public
Message:

Fix user name verification in EAP-TLS plugin

File:
1 edited

Legend:

Unmodified
Added
Removed
  • extensions/app_diameap/diameap_mysql.c

    r444 r577  
    8383
    8484                user->id = atoi(row[0]);
    85                 CHECK_MALLOC(user->userid=malloc(strlen(row[1])));
    86                 memcpy(user->userid,row[1],strlen(row[1]));
     85                CHECK_MALLOC(user->userid=malloc(strlen(row[1])+1));
     86                memcpy(user->userid,row[1],strlen(row[1])+1);
    8787                user->useridLength = strlen(row[1]);
    88                 CHECK_MALLOC(user->password=malloc(strlen(row[2])));
    89                 memcpy(user->password, row[2],strlen(row[2]));
     88                CHECK_MALLOC(user->password=malloc(strlen(row[2])+1));
     89                memcpy(user->password, row[2],strlen(row[2])+1);
    9090                user->passwordLength = strlen(row[2]);
    9191                user->proposed_eap_method = atoi(row[3]);
Note: See TracChangeset for help on using the changeset viewer.