BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000404 [BusyBox] Other minor always 08-26-05 23:51 09-05-05 09:36
Reporter Charles View Status public  
Assigned To BusyBox
Priority normal Resolution fixed  
Status closed   Product Version 1.00
Summary 0000404: Miscalculation of prompt length in command-line editing
Description     The length of prompt is mis-calcluated when command-line prompt string contains pairs of '\[' and '\]' characters. For example, setting PS1 to '\[\033]0;\u@\h:\w\007\][\u@\h \w]\$ ' will cause problems in command-line editing when the commands entered are long enough.
Additional Information     It seems that the cause of the problems is the codes near the end of function parse_prompt() in file shell/cmdedit.c (when CONFIG_FEATURE_SH_FANCY_PROMPT is defined). The code fragments

...
if (flg_not_length == ']')
    sub_len++;
...

should be replaced with

...
if (flg_not_length == ']')
    sub_len += strlen(pbuf);
...

Please confirm this bug and have it fixed.
Attached Files  cmdedit.patch [^] (545 bytes) 08-26-05 23:51

- Relationships

- Notes
(0000489)
vodz
09-05-05 09:01

I destroy this bug in revision 11335
 
(0000490)
vodz
09-05-05 09:04

I destroy this bug in revision 11334
 
(0000491)
landley
09-05-05 09:36

vodz says this was fixed in r11334
 

- Issue History
Date Modified Username Field Change
08-26-05 23:51 Charles New Issue
08-26-05 23:51 Charles Status new => assigned
08-26-05 23:51 Charles Assigned To  => BusyBox
08-26-05 23:51 Charles File Added: cmdedit.patch
08-26-05 23:56 Charles Issue Monitored: Charles
09-05-05 09:01 vodz Note Added: 0000489
09-05-05 09:04 vodz Note Added: 0000490
09-05-05 09:36 landley Status assigned => closed
09-05-05 09:36 landley Note Added: 0000491
09-05-05 09:36 landley Resolution open => fixed


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker