>>252
if ((str = (int**)malloc(sizeof(int*) * m)) == NULL) {
じゃなくて
if (!(str = (int**)malloc(sizeof(int*) * m))) {
にしろって。話聞いてなかったのか?