From db6a566ba89e8e9a9d51b90aad23c6b5ed07e710 Mon Sep 17 00:00:00 2001
From: ryuzakighost <ryuzakighost@gmail.com>
Date: Fri, 12 Oct 2018 22:42:21 +1100
Subject: [PATCH] attempt 3

---
 src/machine-vuln1.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/machine-vuln1.c b/src/machine-vuln1.c
index fd7f256..9a171dc 100644
--- a/src/machine-vuln1.c
+++ b/src/machine-vuln1.c
@@ -215,7 +215,7 @@ unsigned int tokenise(char *str, char * toks[], unsigned int toksLen){
 
 
 #define MAX_LINE_LENGTH  1022
-#define MAX_INSTRUCTIONS 65536
+#define MAX_INSTRUCTIONS 65536*2
 
 /* two extra chars in each line: the newline '\n' and NUL '\0' */
 #define INSTRUCTION_LENGTH (MAX_LINE_LENGTH+2)
@@ -438,7 +438,7 @@ static int read_program(const char *filename){
   memset(program,0,sizeof(program));
 
   int instructionCount = 0;
-  while (instructionCount < 2*MAX_INSTRUCTIONS){
+  while (instructionCount < MAX_INSTRUCTIONS){
     /*VULN*/
     char * res = fgets(program[instructionCount],MAX_LINE_LENGTH+2,f);
     if (res == NULL){
-- 
GitLab