It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center
                            
                        
                    
                
                                已关闭8年。
            
                    
作为C语言的初学者,我想知道每个C程序员应该熟悉的基本安全技巧。严格引用C。

最佳答案

认为主要问题是buffer overflow
可能会使用fgets或scanf之类的函数发生,而没有指定要读取的最大字节数。大于分配的缓冲区的恶意输入字符串可能会覆盖堆栈中的返回地址,从而导致执行所提供的利用程序。

关于c++ - C语言应避免的基本安全性错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/6271110/

10-11 22:35