--- crontab.c.orig 2010-06-11 21:47:43.000000000 +0200 +++ crontab.c 2010-06-11 21:48:15.000000000 +0200 @@ -866,8 +866,19 @@ */ rewind(NewCrontab); Set_LineNum(1) - while (EOF != (ch = get_char(NewCrontab))) + while (EOF != (ch = get_char(NewCrontab))) { + /* Do not accept carriage return and backspace characters + * because they could be used to hide scheduled tasks. + */ + if(ch == '\r' || ch == '\b') { + fprintf(stderr, "%s: Some control characters are not allowed\n", + ProgramName); + fclose(tmp); unlink(tn); + return (-2); + } + putc(ch, tmp); + } if (ferror(tmp) || fflush(tmp) || fsync(fd)) { fprintf(stderr, "%s: %s: %s\n",