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

strcpy->SAFECOPY

CID 319062
parent ab1d0b4a
Branches
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
...@@ -44,7 +44,7 @@ uint sbbs_t::finduser(const char* instr, bool silent_failure) ...@@ -44,7 +44,7 @@ uint sbbs_t::finduser(const char* instr, bool silent_failure)
if(str2[0] && strcmp(str2,"DELETED USER")) if(str2[0] && strcmp(str2,"DELETED USER"))
return(i); return(i);
} }
strcpy(str,instr); SAFECOPY(str,instr);
strupr(str); strupr(str);
SAFEPRINTF(str3,"%suser/name.dat",cfg.data_dir); SAFEPRINTF(str3,"%suser/name.dat",cfg.data_dir);
if(flength(str3)<1L) if(flength(str3)<1L)
...@@ -65,7 +65,7 @@ uint sbbs_t::finduser(const char* instr, bool silent_failure) ...@@ -65,7 +65,7 @@ uint sbbs_t::finduser(const char* instr, bool silent_failure)
str2[c]=0; str2[c]=0;
if(!c) /* deleted user */ if(!c) /* deleted user */
continue; continue;
strcpy(str3,str2); SAFECOPY(str3,str2);
strupr(str2); strupr(str2);
if(pass==1 && !strcmp(str,str2)) { if(pass==1 && !strcmp(str,str2)) {
fclose(stream); fclose(stream);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment