If you want to compile challenge.c yourself you MUST use the flag: -fno-stackprotector Otherwise fgets might give you trouble.