Multiple choice technology security

Which compilation switch should be enabled for stack protection? Choose the best and most secure option.

  1. fstack-protector

  2. fstack-protector-all

  3. fdelete-null-pointer-checks

  4. Both a and b

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

-fstack-protector-all protects all functions (most secure). -fstack-protector only protects functions with character arrays or calls to alloca(). Option C is unrelated to stack protection. Option D is wrong because A is not the best option.