Code Quenching Technology in Linux-general Linux technology-Linux programming and kernel information. For details, refer to the following section. [IT168 practical skills] We know that the blacksmith often heated the metal workpiece to a certain temperature, and then suddenly dipped in water or oil to cool it, so as to effectively increase its hardness. Similarly, software developers can take some means to significantly improve the reliability and quality of software. We call it code quenching technology.
I. Benefits of code Quenching
Ideally, the software quenching technology first predicts where errors may occur in the code, and then either brings us a way to completely avoid errors to write code or identify errors in a timely manner, this makes it easier to track source code. Especially for C language, because it is not a secure language, software quenching technology is needed to improve software reliability. This article describes common code quenching methods in Linux.
Ii. Common Code Quenching Technology
There are various forms of code quenching technology. Here we will talk about various technologies that help us build more robust code.
1. Buffer Overflow
The buffer zone is a very serious security problem. In the best case, it may lead to disorder of the software; in severe cases, it will cause the buffer to take control of the program and execute any code that attackers want to execute. See the following sample code:
CODE: static char ourArray [100];
...
Int I;
For (I = 0; I <100; I ++ ){
OurArray [I] = (char) (0x30 + I );
}
OurArray [I] = 0; // out of bounds, dangerous! |