cybersecurity · beginner · ~15 min
Compare a write size against the buffer capacity.
Implement int will_overflow(int write_len, int buf_size) returning 1 if writing write_len bytes into a buf_size buffer overflows it (write_len > buf_size), else 0.
int will_overflow(int write_len, int buf_size) {
/* TODO */
return 0;
}
Solve this exercise in the browser editor — compile and run against the test harness, no setup required.