Canary

*** stack smashing detected ***: <unknown> terminated
Aborted (core dumped)

Smashing Protector-Tack "mechanism ( insert some canary in the array (Canary, because everyone in the mine operations, will come with canary warning, if the canary died, that proved gas), in the implementation of the completion function returned checks before it Canary, if the canary is to get rid of, no longer continue, stop the program, avoid executing the attacker's code. )

Therefore, a "stack overflow" is wrong, in fact, the protective effect GCC compiler! This is why the error only after printing results!

Also, try not to turn on how the "Stack-Smashing Protector" compilation. ( "Stack-Smashing Protector" is enabled by default!)

Such as: $ gcc test.c -fno-stack-protector. After the output will not report the results of running "stack smashing detected"!

 

Or increasing the length / within the bounds checking function, to prevent cross-border!

Guess you like

Origin www.cnblogs.com/xpylovely/p/11391333.html