"Richard L. Hamilton" <[EMAIL PROTECTED]> wrote:

> Just stumbled across
> http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/cmd/cron/cron.c#1128
>
> Somehow, that looks less than safe to me; if fed a crontab where the last
> character is a backslash (no newline), I wonder if that code could still be
> guaranteed to be well-behaved.  (not that I've managed to make it core
> yet over that)

A fix would be:

        if (line[cursor] == '\\' && line[cursor+1] != '\n' && line[cursor+1] != 
'\0') {
                cursor += 2;
                goto again;
        }

Jörg

-- 
 EMail:[EMAIL PROTECTED] (home) Jörg Schilling D-13353 Berlin
       [EMAIL PROTECTED]                (uni)  
       [EMAIL PROTECTED]     (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to