--- a/mcabber/src/screen.c Sun Jul 03 22:41:42 2005 +0100
+++ b/mcabber/src/screen.c Mon Jul 04 12:55:54 2005 +0100
@@ -1167,6 +1167,14 @@
scr_LogPrint("Please send this part now...");
return;
}
+ if (num >= MULTILINE_MAX_LINE_NUMBER) {
+ // We don't allow too many lines; however the maximum is arbitrary
+ // (It should be < 1000 yet)
+ scr_LogPrint("Your message has too many lines, this one has "
+ "not been added.");
+ scr_LogPrint("Please send this part now...");
+ return;
+ }
multiline = g_renew(char, multiline, len);
strcat(multiline, "\n");
strcat(multiline, line);
--- a/mcabber/src/screen.h Sun Jul 03 22:41:42 2005 +0100
+++ b/mcabber/src/screen.h Mon Jul 04 12:55:54 2005 +0100
@@ -16,6 +16,11 @@
#define INPUTLINE_LENGTH 1024
+// Only used in screen.c; this is the maximum line number
+// in a multi-line message. Should be < 1000
+// Note: message length is limited by the HBB_BLOCKSIZE size too
+#define MULTILINE_MAX_LINE_NUMBER 299
+
extern int update_roster;
void scr_InitCurses(void);