« 様子見中 | メイン | 5x5の電源タップ »

Torture Bill as C Code

Schneier on Security: Torture Bill as C Code

Torture Bill as C Code

Kevin boils down the new terrorist (and others) arrest/detainment/torture bill into a small piece of C code:

if (person = terrorist) {
punish_severely();
} else {
exit(-1);
}

よくやるエンバグなんですが、if文のところ、本当は==にするべきところが、=になってます。
これをやると、if文のところで代入が起きて、全部Trueとして処理されてしまいます。

で、これのネタなところは、
「全ての人がテロリストに仕立て上げられてしまう」
という点です。
まあ、今のアメリカらしいっちゃあらしいですが。

トラックバック

このエントリーのトラックバックURL:
http://www2.4bn.ne.jp/~ikeda/cgi-bin/blog/mt-tb.cgi/620

はてなブックマーク - Torture Bill as C Code

コメントを投稿

2012年03月

        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31

アーカイブ

最近のコメント

マイクロアドBTパートナーでおこづかいゲット! Firefox3 Meter
Powered by
Movable Type 3.34