Skip to content

Commit

Permalink
Patched buffer overflow that was causing for question numbers greater…
Browse files Browse the repository at this point in the history
… than 9 in random questions round
  • Loading branch information
arpit-saxena committed Mar 1, 2017
1 parent 56a3bea commit 03059c2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Binary file modified MAIN.PRJ
Binary file not shown.
4 changes: 2 additions & 2 deletions ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ int askq(int lvl, int sub_num, int q_num, int q_num2) //q_num2 is for printing p
correct = j;
}
}

//Setting the options according to order
char ordered_ops[4][BIGSTRLEN(2)];
for(j = 0; j < 4; j++)
Expand All @@ -299,7 +299,7 @@ int askq(int lvl, int sub_num, int q_num, int q_num2) //q_num2 is for printing p
clrscr();
frame();
char centerhead[STDSTRLEN] = "Question ";
char a[2]; itoa(q_num2, a, 10);
char a[5]; itoa(q_num2, a, 10);
strcat(centerhead, a);
prhead(lefthead, centerhead, righthead);
prfoot("", "Press ESC to end the round", "");
Expand Down

0 comments on commit 03059c2

Please sign in to comment.