author | arg@mig29 |
Mon, 27 Nov 2006 10:29:47 +0100 | |
changeset 583 | f4285a97e3e6 |
parent 582 | 70472540c443 |
child 584 | 37281ebc1b5b |
--- a/main.c Sun Nov 26 15:43:16 2006 +0100 +++ b/main.c Mon Nov 27 10:29:47 2006 +0100 @@ -277,10 +277,11 @@ switch(r = read(STDIN_FILENO, stext, sizeof stext - 1)) { case -1: strncpy(stext, strerror(errno), sizeof stext - 1); + stext[sizeof stext - 1] = '\0'; readin = False; break; case 0: - strncpy(stext, "EOF", sizeof stext); + strncpy(stext, "EOF", 4); readin = False; break; default: