http://d.hatena.ne.jp/w_o/20060305#p2
- 開きっぱなし
- 数字とか適当
- スタックに巨大バッファ
cat コマンド。
> ./tcci 'char b[50000];fread(b, 1, 50000, fopen("tcci.c","r")); puts(b);' #include <stdio.h> #include <stdlib.h> #include <string.h> #include "libtcc.h" int main(int argc, char* argv[]) { TCCState* s; ... 以下略 ...
音が鳴ります。ビビー。
> ./tcci 'int i; for (i = 0; i < 10000; i++) { putchar((char)(sin(i*0.1)*100)); }' > /dev/dsp
結局手軽な文字列操作が無いのがどうも困るかな。freeしないことを前提にした string.h と regex.h があればいいかな。