I didnt really understand the working im kinda like a noob in this but could you explain how it works ?like my only doubt is why it segfaults for Cla%sic_Che%s%steak and not for any other combination of %s
Okay, after seeing this video, I think it was straightforward. When I was trying, I got to the point that I had to give some input greater than that mentioned (2*BUF_SIZE). I overlooked the %114d in one of the choices. I wrote Breakf@st_Burger 5 times in the input without spaces. I did get the message "There is no such burger yet", but I also got the flag. Is it because of some overflow?
Sorry, but i don't know why printf(choice1) doesn't have format string error?
Because you aren't allowed to put in an arbitrary string, but only one on the menu.
I didnt really understand the working im kinda like a noob in this but could you explain how it works ?like my only doubt is why it segfaults for Cla%sic_Che%s%steak and not for any other combination of %s
You might want to read more about format string specifiers, e.g. cplusplus.com/reference/cstdio/printf/.
Okay, after seeing this video, I think it was straightforward.
When I was trying, I got to the point that I had to give some input greater than that mentioned (2*BUF_SIZE). I overlooked the %114d in one of the choices. I wrote Breakf@st_Burger 5 times in the input without spaces. I did get the message "There is no such burger yet", but I also got the flag. Is it because of some overflow?
This problem prints the flag if you make it crash for any reason.