During a review of an application, a function is identified that can push user data beyond its allocated space. Which measure is most likely to prevent malicious exploits in this scenario?
Enable multi-factor authentication
Configure an allow list for domain-based restrictions
Increase hashing strength for stored data
Use a safe string-handling library that limits input size
Using safe string-handling libraries or methods that enforce boundary checks ensures data does not exceed allocated memory. Other approaches do not directly address memory boundaries. Enabling multi-factor authentication adds an extra login layer but does not stop data from being written outside assigned buffers. Increasing hashing strength helps protect stored data but does not defend the function in question. Configuring an allow list for domain-based restrictions does not solve the memory overwrite risk.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is a buffer overflow?
Open an interactive chat with Bash
Why are safe string-handling libraries important?
Open an interactive chat with Bash
Can enabling multi-factor authentication (MFA) prevent buffer overflows?