Question: The program doesn t validate if the execution of realloc ( ) was successful, that is if the memory was allocated The newly resized space
The program doesnt validate if the execution of realloc was successful, that is if the memory was allocated
The newly resized space is uninitialized. Printing uninitialized variables can result in unexpected program behavior, such as execution of arbitrary code
Because sizeofint is used to compute the size, and not sizeoflong an insufficient amount of memory can be allocated leading to a buffer overflow
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
