You can identify if a function is protected by the presence of __stack_chk_fail. It doesn't matter if it's user-custom code or it is statically compiled from libraries.
gets is a very problematic function by design. It's impossible to protect it from buffer overflows
In this case, the stack ...