1
0
Fork 0

strcpy_s patches

This commit is contained in:
zerosum0x0 2015-02-01 16:06:44 -07:00
parent 7b5ea5f878
commit ca1bca2e58
3 changed files with 7 additions and 7 deletions

View File

@ -296,7 +296,7 @@ BRIDGE_IMPEXP bool DbgSetCommentAt(duint addr, const char* text)
ADDRINFO info;
memset(&info, 0, sizeof(info));
info.flags = flagcomment;
strcpy_s(info.comment, MAX_COMMENT_SIZE, text);
strcpy_s(info.comment, MAX_COMMENT_SIZE, text);
if(!_dbg_addrinfoset(addr, &info))
return false;
return true;
@ -311,7 +311,7 @@ BRIDGE_IMPEXP bool DbgGetModuleAt(duint addr, char* text)
info.flags = flagmodule;
if(!_dbg_addrinfoget(addr, SEG_DEFAULT, &info))
return false;
strcpy_s(text, MAX_MODULE_SIZE, info.module);
strcpy_s(text, MAX_MODULE_SIZE, info.module);
return true;
}

View File

@ -29,7 +29,7 @@ void argformat(char* cmd)
char command_[deflen] = "";
char* command = command_;
strcpy_s(command, deflen, cmd);
strcpy_s(command, deflen, cmd);
while(*command == ' ')
command++;
@ -112,7 +112,7 @@ void argformat(char* cmd)
j += sprintf(temp + j, "%c", arguments[i]);
}
arguments = arguments_;
strcpy_s(arguments, deflen, temp);
strcpy_s(arguments, deflen, temp);
}
len = (int)strlen(arguments);
for(int i = 0; i < len; i++)
@ -128,7 +128,7 @@ void argformat(char* cmd)
i += 2;
j += sprintf(temp + j, "%c", arguments[i]);
}
strcpy_s(arguments, deflen, temp);
strcpy_s(arguments, deflen, temp);
len = (int)strlen(arguments);
for(int i = 0, j = 0; i < len; i++)
@ -137,7 +137,7 @@ void argformat(char* cmd)
i++;
j += sprintf(temp + j, "%c", arguments[i]);
}
strcpy_s(arguments, deflen, temp);
strcpy_s(arguments, deflen, temp);
len = (int)strlen(arguments);
for(int i = 0; i < len; i++)

View File

@ -75,7 +75,7 @@ bool cmdnew(COMMAND* command_list, const char* name, CBCOMMAND cbCommand, bool d
COMMAND* cmdget(COMMAND* command_list, const char* cmd)
{
char new_cmd[deflen] = "";
strcpy_s(new_cmd, deflen, cmd);
strcpy_s(new_cmd, deflen, cmd);
int len = (int)strlen(new_cmd);
int start = 0;
while(new_cmd[start] != ' ' and start < len)