列出C的最危险部分 [英] Listing the most dangerous parts of C

查看:72
本文介绍了列出C的最危险部分的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在寻找一个应该从C(C99)中删除的东西的愿望清单 - 由于功能'的安全跟踪记录错误< OT>或

多线程不安全。我需要这个列表用于打算建立另一个(最简单和最强大的)编程语言的项目,其中

有一个两页定义文档说明:..包括C

编程语言(C99),除了它着名的

" avoid-using-this-functions"。 < / OT>


如果您不想删除整个函数但仅使用

它带有某些参数/参数,那些会是什么组合

是什么样的? (比如带有%s或%[scan]的scanf


可能有官方不使用推荐列表。

(比这更好的百万倍)
http://tele3d.com/wiki/index.php/Par。 ..ncluded_in_t3d


请不要通过说明除了

gets()之外的所有功能都是安全的,如果使用得当,不要绕过这个问题。这就像教导说苏联的意识形态是正确的,苏联人民是错误的,系统是行不通的。


Juuso Hukkanen

(通过电子邮件回复设置月份和年份的地址来纠正)
www.tele3d.com

I am looking for a wish list of things which should be removed from
the C (C99) - due to feature''s bad security track record <OT>or
Multithreading unsafety. I need this list for a project intending to
build another (easiest & most powerful) programming language, which
has a two page definition document stating: "... includes C
programming language (C99), except its famous
"avoid-using-this-functions". </OT>

If you would not want to remove a whole function but only the use of
it with certain arguments / parameters, what would those combinations
be like? (Like scanf with %s or %[ arguments )

Probably there are official not to use recommendation lists.
( million times better than this)
http://tele3d.com/wiki/index.php/Par...ncluded_in_t3d

Please, do not circumvent the question by saying all functions except
gets() are safe if used properly. That would be like teaching that
"the ideology of Soviet Union was right, it was the Soviet peoples
fault that the system didn''t work.

Juuso Hukkanen
(to reply by e-mail set addresses month and year to correct)
www.tele3d.com

推荐答案

Juuso Hukkanen écrit:
Juuso Hukkanen a écrit :
我正在寻找一个应该从C(C99)中移除的事物的愿望清单 - 由于功能的安全跟踪记录错误< OT>或者
多线程不安全。我需要这个列表来打算构建另一个(最简单和最强大的)编程语言的项目,它有一个两页定义文档说明:...包括C
编程语言(C99),除了它着名的
避免使用这个功能。 < / OT>

如果您不想删除整个函数但只想使用某些参数/参数,那么这些组合会是什么样的? (比如带有%s或%[scan]的scanf

可能有官方不使用推荐列表。
(比这更好的一百倍)
http://tele3d.com/wiki/index.php/Par...ncluded_in_t3d

请不要通过说明除了
gets()之外的所有功能都是安全的,如果使用得当,不要绕过这个问题。这就像教导苏联的意识形态是正确的,苏联人民的错误,系统不起作用。Juuso Hukkanen
(通过电子邮件设置地址回复月份和年份以纠正)
www。 tele3d.com
I am looking for a wish list of things which should be removed from
the C (C99) - due to feature''s bad security track record <OT>or
Multithreading unsafety. I need this list for a project intending to
build another (easiest & most powerful) programming language, which
has a two page definition document stating: "... includes C
programming language (C99), except its famous
"avoid-using-this-functions". </OT>

If you would not want to remove a whole function but only the use of
it with certain arguments / parameters, what would those combinations
be like? (Like scanf with %s or %[ arguments )

Probably there are official not to use recommendation lists.
( million times better than this)
http://tele3d.com/wiki/index.php/Par...ncluded_in_t3d

Please, do not circumvent the question by saying all functions except
gets() are safe if used properly. That would be like teaching that
"the ideology of Soviet Union was right, it was the Soviet peoples
fault that the system didn''t work.

Juuso Hukkanen
(to reply by e-mail set addresses month and year to correct)
www.tele3d.com




什么是t3d第一个???


从那个维基页面上,了解到底是什么原因是完全不可能的。


jacob



What is "t3d" first ???

From that wiki page it is completely imposssible to have an idea what
the hell is that.

jacob




2006年5月10日星期三,jacob navia写道:

On Wed, 10 May 2006, jacob navia wrote:
Juuso Hukkanen a écrit:
Juuso Hukkanen a écrit :
我正在寻找一个应该从C(C99)中删除的事物的愿望清单 - 由于功能'的安全跟踪记录错误< OT>或
多线程不安全。我需要这个列表来打算构建另一个(最简单和最强大的)编程语言的项目,它有一个两页定义文档说明:...包括C
编程语言(C99),除了它着名的
避免使用这个功能。 < / OT>

如果您不想删除整个函数但只想使用某些参数/参数,那么这些组合会是什么样的? (比如带有%s或%[参数的] scanf
可能有官方不使用推荐列表。
(比这更好的百万倍)
http://tele3d.com/wiki/index.php/Par...ncluded_in_t3d
I am looking for a wish list of things which should be removed from
the C (C99) - due to feature''s bad security track record <OT>or
Multithreading unsafety. I need this list for a project intending to
build another (easiest & most powerful) programming language, which
has a two page definition document stating: "... includes C
programming language (C99), except its famous
"avoid-using-this-functions". </OT>

If you would not want to remove a whole function but only the use of
it with certain arguments / parameters, what would those combinations
be like? (Like scanf with %s or %[ arguments )
Probably there are official not to use recommendation lists.
( million times better than this)
http://tele3d.com/wiki/index.php/Par...ncluded_in_t3d



什么是t3d第一个???

从那个维基页面上,了解到底是什么原因是完全不可能的。



What is "t3d" first ???

From that wiki page it is completely imposssible to have an idea what the
hell is that.




这是蒸发器。这家伙一直在推动其自然语言,巨型

内置函数库。模特至少一年左右,现在。

(问题是自然语言不是,而且内置

函数不是。)


FWIW,我会说得到(显然),strtok(不是

线程) -safe),atoi(无法进行错误检查),以及大部分scanf

(再次进行错误检查)。

scanf("%* s" )很好,但是scanf(%s)是邪恶的,scanf(%99s)是不可维护的,并且scanf(%d)在输入时以不可预测的方式窒息

喜欢3287482475。


我的



It''s vaporware. This guy''s been pushing its "natural language, giant
built-in library of functions" model for at least a year or so, now.
(The problems are that the "natural" language isn''t, and the "built-in"
functions aren''t.)

FWIW, off the top of my head I''d say gets (obviously), strtok (not
thread-safe), atoi (no error-checking possible), and much of scanf
(again with the error-checking).
scanf("%*s") is fine, but scanf("%s") is evil, scanf("%99s") is
unmaintainable, and scanf("%d") chokes in unpredictable ways on input
like "3287482475".

my


.02,

- 亚瑟
.02,
-Arthur


这篇关于列出C的最危险部分的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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