[PATCH 1/1] rev: handle cases where lines are too long for buffer
Clayton Craft
clayton at craftyguy.net
Mon Aug 9 21:10:12 UTC 2021
On Mon, 09 Aug 2021 21:57:00 +0100 Ron Yorston <rmy at pobox.com> wrote:
> Or how about this?
>
> Ron
> ---
> util-linux/rev.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/util-linux/rev.c b/util-linux/rev.c
> index d439b4da8..63b005c67 100644
> --- a/util-linux/rev.c
> +++ b/util-linux/rev.c
> @@ -109,6 +109,7 @@ int rev_main(int argc UNUSED_PARAM, char **argv)
> strrev(buf, strlen(buf));
> #endif
> fputs_stdout(buf);
> + pos = 0;
Yeah... that also seems to fix it, and is obviously less intrusive/crazy than
the thing I sent.
-Clayton
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20210809/5dd9128f/attachment-0001.asc>
More information about the busybox
mailing list