added license for (sort of) PuTTY-derived stuff; make buflen a fixed value