From f96b90d16661b15d8d830a3a22f5ad91bf36e85b Mon Sep 17 00:00:00 2001 From: David Griffith Date: Mon, 30 Jan 2017 19:32:21 -0800 Subject: [PATCH] Fix #33: Increase TEXT_BUFFER_SIZE to 275. Inform7 is capable of overflowing the text (output) buffer by cramming it with a maximum of 263 bytes. This was discovered by pushing the limits of the Inform7 compiler. Inform6 won't do this, even if it's told to print text far exceeding 263 bytes. This overflow situation is not a security problem because the VM catches it and aborts. I am unsure if it's a good idea to truncate the attempt to overfill the buffer and continue. --- src/common/frotz.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/frotz.h b/src/common/frotz.h index d7807f6..cb82c72 100644 --- a/src/common/frotz.h +++ b/src/common/frotz.h @@ -100,7 +100,7 @@ typedef struct { #define MAX_FILE_NAME 80 #endif #ifndef TEXT_BUFFER_SIZE -#define TEXT_BUFFER_SIZE 200 +#define TEXT_BUFFER_SIZE 275 #endif #ifndef INPUT_BUFFER_SIZE #define INPUT_BUFFER_SIZE 200 -- 2.34.1