Skip to content
Snippets Groups Projects
Commit 28cfca28 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Fix sizeof(cursub / curdir) issue as these user_t fields were increased in v3.20

... but the old user.dat fields would still just be 16 chars in size.

Also a strcpy -> SAFECOPY conversion for user tmpext.
parent 990d88d9
No related branches found
No related tags found
No related merge requests found
......@@ -346,8 +346,8 @@ static int v31x_parseuserdat(scfg_t* cfg, char *userdat, user_t *user)
getrec(userdat,U_LEECH,2,str);
user->leech=(uchar)ahtoul(str);
getrec(userdat,U_CURSUB,sizeof(user->cursub)-1,user->cursub);
getrec(userdat,U_CURDIR,sizeof(user->curdir)-1,user->curdir);
getrec(userdat,U_CURSUB,16,user->cursub);
getrec(userdat,U_CURDIR,16,user->curdir);
getrec(userdat,U_CURXTRN,8,user->curxtrn);
getrec(userdat,U_FREECDT,LEN31x_CDT,str);
......@@ -383,7 +383,7 @@ static int v31x_parseuserdat(scfg_t* cfg, char *userdat, user_t *user)
getrec(userdat,U_TMPEXT,3,user->tmpext);
if((!user->tmpext[0] || !strcmp(user->tmpext,"0")) && cfg->total_fcomps)
strcpy(user->tmpext,cfg->fcomp[0]->ext); /* For v1x to v2x conversion */
SAFECOPY(user->tmpext,cfg->fcomp[0]->ext); /* For v1x to v2x conversion */
getrec(userdat,U_CHAT,8,str);
user->chat=ahtoul(str);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment