Fix #33: Increase TEXT_BUFFER_SIZE to 275.
authorDavid Griffith <dave@661.org>
Tue, 31 Jan 2017 03:32:21 +0000 (19:32 -0800)
committerDavid Griffith <dave@661.org>
Tue, 31 Jan 2017 03:32:21 +0000 (19:32 -0800)
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

index d7807f6908c208ea2e3af0c9475d0ee488de67f1..cb82c720e199af74119f8627db68bf307e6db5ff 100644 (file)
@@ -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