Mikulas Patocka <[EMAIL PROTECTED]> wrote:
> This patch fixes segmentation fault with ls on systems, where SIZE_MAX is
> different from -1.
Thank you!
I suppose you noticed the actual segfault.
What type of system were you using?
BTW, there is one other such use in the current (CVS) sources:
--- src/ls.c 21 Apr 2004 12:51:27 -0000 1.353
+++ src/ls.c 23 Apr 2004 17:20:08 -0000
@@ -3231,7 +3231,8 @@ quote_name (FILE *out, const char *name,
size_t *width)
{
char smallbuf[BUFSIZ];
- size_t len = quotearg_buffer (smallbuf, sizeof smallbuf, name, -1, options);
+ size_t len = quotearg_buffer (smallbuf, sizeof smallbuf, name, SIZE_MAX,
+ options);
char *buf;
size_t displayed_width IF_LINT (= 0);
@@ -3240,7 +3241,7 @@ quote_name (FILE *out, const char *name,
else
{
buf = alloca (len + 1);
- quotearg_buffer (buf, len + 1, name, -1, options);
+ quotearg_buffer (buf, len + 1, name, SIZE_MAX, options);
}
if (qmark_funny_chars)
_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils