Fixed buffer overflow with too long newsheader
This commit is contained in:
@@ -692,7 +692,7 @@ void Reply_Email(int IsReply)
|
||||
sLine();
|
||||
|
||||
for (i = 0; i < (TEXTBUFSIZE + 1); i++)
|
||||
Message[i] = (char *) calloc(81, sizeof(char));
|
||||
Message[i] = (char *) calloc(MAX_LINE_LENGTH +1, sizeof(char));
|
||||
Line = 1;
|
||||
Msg_New();
|
||||
|
||||
@@ -821,7 +821,7 @@ void Write_Email(void)
|
||||
clear();
|
||||
|
||||
for (i = 0; i < (TEXTBUFSIZE + 1); i++)
|
||||
Message[i] = (char *) calloc(81, sizeof(char));
|
||||
Message[i] = (char *) calloc(MAX_LINE_LENGTH +1, sizeof(char));
|
||||
Line = 1;
|
||||
|
||||
Msg_New();
|
||||
|
@@ -7,7 +7,7 @@
|
||||
int Fs_Edit(void); /* The fullscreen message editor */
|
||||
|
||||
extern int Line; /* Number of lines + 1 */
|
||||
extern char *Message[]; /* TEXTBUFSIZE lines of 80 chars */
|
||||
extern char *Message[]; /* TEXTBUFSIZE lines of MAX_LINE_LENGTH chars */
|
||||
|
||||
int Row; /* Current row on screen */
|
||||
int Col; /* Current column in text and on screen */
|
||||
|
@@ -410,7 +410,7 @@ void Post_Msg()
|
||||
return;
|
||||
|
||||
for (i = 0; i < (TEXTBUFSIZE + 1); i++)
|
||||
Message[i] = (char *) calloc(81, sizeof(char));
|
||||
Message[i] = (char *) calloc(MAX_LINE_LENGTH +1, sizeof(char));
|
||||
Line = 1;
|
||||
|
||||
Msg_New();
|
||||
@@ -1321,7 +1321,7 @@ void Reply_Msg(int IsReply)
|
||||
sLine();
|
||||
|
||||
for (i = 0; i < (TEXTBUFSIZE + 1); i++)
|
||||
Message[i] = (char *) calloc(81, sizeof(char));
|
||||
Message[i] = (char *) calloc(MAX_LINE_LENGTH +1, sizeof(char));
|
||||
Msg_New();
|
||||
|
||||
strncpy(Msg.Replyid, msgid, 80);
|
||||
|
@@ -2280,7 +2280,7 @@ void QWK_Fetch()
|
||||
colour(LIGHTBLUE, BLACK);
|
||||
/* Processing BlueWave reply packet */
|
||||
printf("%s\n", (char *)Language(459));
|
||||
temp = calloc(2048, sizeof(char));
|
||||
temp = calloc(PATH_MAX, sizeof(char));
|
||||
otemp = calloc(PATH_MAX, sizeof(char));
|
||||
nWidth = 78;
|
||||
|
||||
|
Reference in New Issue
Block a user