Bug in cut

Richard Hoyle hoyle.richard at googlemail.com
Wed Nov 21 06:12:50 UTC 2007


Hi,

There seems to be a bug in the cut command.  Try this in _install/bin

./echo fred | ./cut -b1 | ./cat -

This patch seems to fix the problem.

--- cut.c.org   2007-11-10 01:40:51.000000000 +0000
+++ cut.c       2007-11-21 05:57:03.000000000 +0000
@@ -284,5 +284,5 @@
        }
        if (ENABLE_FEATURE_CLEAN_UP)
                free(cut_lists);
-       return EXIT_SUCCESS;
+    fflush_stdout_and_exit(EXIT_SUCCESS);
 }

Thanks for BusyBox and making it GPL'd software.

All the best,

===Rich



More information about the busybox mailing list