cybersecurity · intermediate · ~15 min · safe pentest lab
Recognise the terminator-canary design.
A terminator canary contains a NUL byte to stop string-based overflows. Implement int is_terminator_canary(unsigned long c) returning 1 if the LOW byte of c is 0, else 0.
int is_terminator_canary(unsigned long c) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.