What are security issues in the C language?
What are security issues in the C language? I recently read about two of them: 1. Buffer Overflow: It happens when data written to a buffer (chunk of memory) overflows and gets overwritten onto the adjacent memory due to lack of proper boundary checks. Let me show you something - consider the following code that I tried on Compile and Execute C Online, (An Online C Compiler) : You can clearly see that I have allocated memory for only 8 integers in the array 'a', but I have tried to access and modify the value corresponding to 10th integer in array 'a' (a memory location that belongs to some other entity). Certainly, anything this unethical must not be allowed, right guys... but the output is quite surprising, isn't it: Then, I got a little more ambitious and tried the following: and I got the utmost feared segmentation fault: So, what happened ? Well, C wil...