CVSROOT: /cvs Module name: src Changes by: schwa...@cvs.openbsd.org 2015/11/10 07:42:41
Modified files: usr.bin/rs : rs.c Log message: With -H, do not overrun your static buffer on files longer than 4 kB. With -K, do not print bogus blank lines in case of premature EOF. While here, completely rewrite get_line() in a modern style using getline(3), ferror(3), strdup(3), and ssize_t for line lengths. Completely get rid of the static buffer. I wouldn't be very surprised if this fixes even more bugs than the two ones mentioned above. OK (and "amazing") deraadt@