On Monday 14 July 2008 11:25, Rob Landley wrote:
> > busybox vi seems to be lacking active users :(
> > For one, I don't use it too, so bugs go unnoticed.
> 
> I'm plugging the sucker into Firmware Linux again.  (I've disabled toybox 
> almost entirely for the moment, only used for oneit and patch.)
> 
> The huge piles of bugs and missing features I found from 2003 through 2006?  
> Pretty much from plugging the sucker into a full development environment, 
> building a Linux system using it, and then running the result and trying to 
> debug it under itself.

I am actually using busybox all the time.
 
> I am, however, still banging on the release version, not svn.

Take 1.11.1, it has only trivial fixes. There is one fresh post 1.11.1 fix too


> Expect more bugs. :)
> 
> Rob
> 
> P.S  The "optimize cursor movement" option of VI _totally_does_not_work_.  
> You 
> have to disable that or the screen is garbage.  (For me, anyway...)

Wow. char cm2[] at line 2513 is being used after it goes out of scope
by way of a pointer. Amazing. :)

See attached.
--
vda
diff -d -urpN busybox.1/editors/vi.c busybox.2/editors/vi.c
--- busybox.1/editors/vi.c	2008-07-17 00:20:20.000000000 +0200
+++ busybox.2/editors/vi.c	2008-07-17 20:56:58.000000000 +0200
@@ -2492,6 +2492,14 @@ static int file_write(char *fn, char *fi
 static void place_cursor(int row, int col, int optimize)
 {
 	char cm1[sizeof(CMrc) + sizeof(int)*3 * 2];
+#if ENABLE_FEATURE_VI_OPTIMIZE_CURSOR
+	enum {
+		SZ_UP = sizeof(CMup),
+		SZ_DN = sizeof(CMdown),
+		SEQ_SIZE = SZ_UP > SZ_DN ? SZ_UP : SZ_DN,
+	};
+	char cm2[SEQ_SIZE * 5 + 32]; // bigger than worst case size
+#endif
 	char *cm;
 
 	if (row < 0) row = 0;
@@ -2505,12 +2513,6 @@ static void place_cursor(int row, int co
 
 #if ENABLE_FEATURE_VI_OPTIMIZE_CURSOR
 	if (optimize && col < 16) {
-		enum {
-			SZ_UP = sizeof(CMup),
-			SZ_DN = sizeof(CMdown),
-			SEQ_SIZE = SZ_UP > SZ_DN ? SZ_UP : SZ_DN,
-		};
-		char cm2[SEQ_SIZE * 5 + 32]; // bigger than worst case size
 		char *screenp;
 		int Rrow = last_row;
 		int diff = Rrow - row;
_______________________________________________
busybox mailing list
[email protected]
http://busybox.net/cgi-bin/mailman/listinfo/busybox

Reply via email to