medium
Single Answer
0

When a multithreaded application does not properly handle various threads accessing a common value, and one thread can change the data while another thread is relying on it, what flaw is this?

Answer Options

A

Memory leak

B

Buffer overflow

C

Integer overflow

D

Time-of-check/time-of-use

Correct Answer: D

Explanation

If access is not handled properly, a time-of-check (TOC)/time-of-use (TOU) condition can exist where the memory is checked, changed, then used. Memory leaks occur when memory is allocated but not deallocated. A buffer overflow is when more data is put into a variable than it can hold. An integer overflow occurs when an attempt is made to put an integer that is too large into a variable, such as trying to put a 64-bit integer into a 32-bit variable.