if (argc<3) {
printf("usage: lzoma input output [lzlit lit olz len dist]\n");
int i;
int total=atoi(argv[1]);//16*1024*1024; <- here it going to crash.
Crash happens because if you run program without any params at all, only argv[0] is available (proram name) but you're trying to access argv[1], which may or may not exist.
Troublesome code is in pack.c, line 936
Crash happens because if you run program without any params at all, only argv[0] is available (proram name) but you're trying to access argv[1], which may or may not exist.