为什么函数strncpy不安全? [英] Why is strncpy insecure?

查看:1631
本文介绍了为什么函数strncpy不安全?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我期待找出为什么函数strncpy被认为是不安全的。没有任何人有任何形式的文档在这个或的例子使用它开发?

I am looking to find out why strncpy is considered insecure. Does anybody have any sort of documentation on this or examples of an exploit using it?

推荐答案

看看的本网站;这是一个相当详细的解释。基本上,函数strncpy()不需要NUL终止,因此很容易受到各种攻击的。

Take a look at this site; it's a fairly detailed explanation. Basically, strncpy() doesn't require NUL termination, and is therefore susceptible to a variety of exploits.

这篇关于为什么函数strncpy不安全?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆