[prev in list] [next in list] [prev in thread] [next in thread]
List: coreutils-bug
Subject: Re: [patch] uninitialized var in fold(1)
From: Jim Meyering <jim () meyering ! net>
Date: 2003-04-11 23:22:24
Message-ID: 85el48ei1b.fsf () pi ! meyering ! net
[Download RAW message or body]
Tim Waugh <twaugh@redhat.com> wrote:
> It seems that line_out is used uninitialized in some circumstances in
> fold; this caused a segfault here. Here's the fix (applies to 5.0
> too):
>
> --- coreutils-4.5.3/src/fold.c.init 2003-04-11 16:44:57.000000000 -0400
> +++ coreutils-4.5.3/src/fold.c 2003-04-11 16:44:46.000000000 -0400
> @@ -269,7 +269,7 @@
> mbstate_t state, state_bak; /* State of the stream. */
> int convfail; /* 1, when conversion is failed. Otherwise 0. */
>
> - char *line_out;
> + char *line_out = NULL;
Hi Tim,
Thanks for reporting that, but how do I reproduce the problem?
In any case, from the patch I see that this can't be a problem with
the GNU coreutils package. The above patch cannot possibly apply to
coreutils-4.5.3 -- or even to any version of textutils released in the
last 10 years -- since the declaration of `line_out' is and always has
been like this:
static char *line_out = NULL;
If there's a bug, then I suspect that it's due to some unofficial
changes.
Jim
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic