Skip to content
Snippets Groups Projects
Commit db6a566b authored by ryuzakighost's avatar ryuzakighost
Browse files

attempt 3

parent acc587a3
Branches
No related tags found
No related merge requests found
......@@ -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){
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment