CWE-234: Failure to Handle Missing Parameter

来源:互联网 发布:灰原哀毛利兰人气知乎 编辑:程序博客网 时间:2024/06/05 17:28

http://cwe.mitre.org/data/definitions/234.html


Example 1

(Bad Code)
Example Languages:C and C++ 
foo_funct(one, two);...
void foo_funct(int one, int two, int three) {

printf("1) %d\n2) %d\n3) %d\n", one, two, three);
}
This can be exploited to disclose information with no work whatsoever.In fact, each time this function is run, it will print out the next 4bytes on the stack after the two numbers sent to it.
0 0
原创粉丝点击