Prevent buffer overflow
This commit is contained in:
parent
2beffbd118
commit
d468f9d8d5
@ -247,7 +247,8 @@ void gareafile::ReadFMail(char* tag) {
|
||||
Path path, file;
|
||||
|
||||
*file = NUL;
|
||||
strcpy(options, tag);
|
||||
options[79] = 0;
|
||||
strncpy(options, tag, 79);
|
||||
ptr = strtok(tag, " \t");
|
||||
while(ptr) {
|
||||
if(*ptr != '-') {
|
||||
|
@ -41,7 +41,8 @@ void gareafile::ReadInterMail(char* tag) {
|
||||
char options[80];
|
||||
|
||||
*_path = NUL;
|
||||
strcpy(options, tag);
|
||||
options[79] = 0;
|
||||
strncpy(options, tag, 79);
|
||||
|
||||
char* ptr = strtok(tag, " \t");
|
||||
while(ptr) {
|
||||
|
@ -96,7 +96,8 @@ void gareafile::ReadQEcho(char* tag) {
|
||||
|
||||
*origin = NUL;
|
||||
*file = NUL;
|
||||
strcpy(options, tag);
|
||||
options[79] = 0;
|
||||
strncpy(options, tag, 79);
|
||||
char* ptr = strtok(tag, " \t");
|
||||
while(ptr) {
|
||||
if(*ptr != '-')
|
||||
|
@ -161,8 +161,9 @@ void gareafile::ReadAdeptXBBS(char* tag) {
|
||||
Path file, path, cfg;
|
||||
|
||||
*path = NUL;
|
||||
options[79] = 0;
|
||||
strcpy(cfg, "System\\Message_Areas");
|
||||
strcpy(options, tag);
|
||||
strncpy(options, tag, 79);
|
||||
char* ptr = strtok(tag, " \t");
|
||||
while(ptr) {
|
||||
if(*ptr != '-')
|
||||
|
Reference in New Issue
Block a user