Re: dircolors database documentation

2005-10-23 Thread Paul Eggert
Eric Blake <[EMAIL PROTECTED]> writes: > It seems fishy that global lines do not cause errors, but terminal > specific ones do. Consistency would argue that we might want to also > check lines not belonging to the current terminal for validity, although > that requires a bigger change to dircolor

Re: dircolors database documentation

2005-10-22 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 10/18/2005 6:36 AM: > > Meanwhile, there are a few bugs I found. I can provide a patch, but need > some agreement on semantics first. One more to get consensus on. Right now, $ echo $TERM xterm $ dircolors - >/dev/null i

Re: dircolors database documentation

2005-10-20 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Paul Eggert on 10/20/2005 1:33 PM: > >>So am I allowed to assume 8-bit chars, or should I add code that checks >>for char overflow, one hex digit at a time? And with 8-bit chars, should >>"\x100" parse as "\x10" "0", or should it raise a

Re: dircolors database documentation

2005-10-20 Thread Paul Eggert
Eric Blake <[EMAIL PROTECTED]> writes: > So am I allowed to assume 8-bit chars, or should I add code that checks > for char overflow, one hex digit at a time? And with 8-bit chars, should > "\x100" parse as "\x10" "0", or should it raise a parse error? Nevermind I see now that printf.c bypa

Re: dircolors database documentation

2005-10-20 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Paul Eggert on 10/20/2005 2:37 AM: > >>How about adopting the C rule of parsing and use at most 3 digits in octal >>escapes? > > > Makes sense. C says that octal escapes may be at most 3 digits, and > "\400" is an error (assuming 8-bit

Re: dircolors database documentation

2005-10-20 Thread Paul Eggert
Andreas Schwab <[EMAIL PROTECTED]> writes: > How about adopting the C rule of parsing and use at most 3 digits in octal > escapes? Makes sense. C says that octal escapes may be at most 3 digits, and "\400" is an error (assuming 8-bit chars). C also says that hex escapes are of unlimited length.

Re: dircolors database documentation

2005-10-19 Thread Andreas Schwab
[EMAIL PROTECTED] (Eric Blake) writes: > A related problem - right now, ls parses an infinite number of digits > in octal and hex escapes. It would probably be wiser if we changed > it to parse only up to what will fit in MAX_CHAR, then end the escape. > The upshot of this is that with 8-bit char

Re: dircolors database documentation

2005-10-19 Thread Jim Meyering
> Paul Eggert <[EMAIL PROTECTED]> wrote: >> Thanks for catching all these problems. >> >> Eric Blake <[EMAIL PROTECTED]> writes: >> >>> Oops - we aren't properly quoting ' in dircolors' output. This should be >>> as simple as outputing '\'' in place of ' in append_quoted(). >> >> That's a serious

Re: dircolors database documentation

2005-10-18 Thread Eric Blake
> Thanks for catching all these problems. > > > > Oops - we aren't handling NUL. Before I provide a patch, we need to > > decide if we WANT to support NUL (in which case, we translate NUL into 0 > > after unquoted \, into @ after unquoted ^, and into \0 otherwise. > > The GNU coding standards s

Re: dircolors database documentation

2005-10-18 Thread Jim Meyering
Paul Eggert <[EMAIL PROTECTED]> wrote: > Thanks for catching all these problems. > > Eric Blake <[EMAIL PROTECTED]> writes: > >> Oops - we aren't properly quoting ' in dircolors' output. This should be >> as simple as outputing '\'' in place of ' in append_quoted(). > > That's a serious bug, no?

Re: dircolors database documentation

2005-10-18 Thread Paul Eggert
Thanks for catching all these problems. Eric Blake <[EMAIL PROTECTED]> writes: > Oops - we aren't properly quoting ' in dircolors' output. This should be > as simple as outputing '\'' in place of ' in append_quoted(). That's a serious bug, no? It lets an attacker execute arbitrary code. Admitt

Re: dircolors database documentation

2005-10-18 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 10/18/2005 6:36 AM: > > I also found a memleak in dc_parse_stream - input_line is malloc'd by > getline(), but missing a free() on a successful line parse. Serves me right for making claims without validating them; getline(

Re: dircolors database documentation

2005-10-18 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 10/17/2005 10:04 PM: > > Turns out I was wrong. Escape sequences exist, so I documented them (and > \_ is a clever way to get space). Meanwhile, there are a few bugs I found. I can provide a patch, but need some agreement

Re: dircolors database documentation

2005-10-17 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 10/17/2005 11:02 AM: > >>I am not very experienced with texinfo yet, >>+lines containing a keyword and argument, separated by whitespace. A # > > > Please use @samp{#}, so it renders as `#'. > [same for `.' and `*' belo

Re: dircolors database documentation

2005-10-17 Thread Jim Meyering
Eric Blake <[EMAIL PROTECTED]> wrote: > Now that my copyright papers are finally in the mail, I can contribute > this for eventual inclusion! Great! > I am not very experienced with texinfo yet, > +lines containing a keyword and argument, separated by whitespace. A # Please use @samp{#}, so it

dircolors database documentation

2005-10-17 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Now that my copyright papers are finally in the mail, I can contribute this for eventual inclusion! I am not very experienced with texinfo yet, so I would appreciate a proofread (although I did validate that everything looks readable in info). When t