vi: odd behaviour when editing files (was: vi segfaults (bb 1.8.2))

Cristian Ionescu-Idbohrn cristian.ionescu-idbohrn at axis.com
Sat Dec 15 06:55:41 PST 2007


This is bb from svn HEAD.

On Sat, 8 Dec 2007, Denys Vlasenko wrote:

> It's simpler than that. Programs should not make assumptions that
> BUFSIZ is bigger than some fixed number. (Well, probably you can
> be sure that it is bigger than, say, 63 :) ).

I configured bb with very small buffers:

  CONFIG_FEATURE_VI_MAX_LEN=256

and built it with:

  # make CFLAGS='-D"BUFSIZ=128"'

Created a file (using another editor) with a few lines (253-258 characters
per line).  Then tried editing that file using bb-vi.  Arrowed down to tha
last line (258 chars) and hit the A-key (which should position the cursor
after the last character (column 259).  See attached terminal dump.
Moving the cursor around the end of those lines (insert and/or editing
modes) I see some interesting artiffects.


Cheers,

-- 
Cristian
-------------- next part --------------
A non-text attachment was scrubbed...
Name: a.png
Type: image/png
Size: 5360 bytes
Desc: 
Url : http://busybox.net/lists/busybox/attachments/20071215/e8a05dda/attachment-0001.png 


More information about the busybox mailing list