Bug 397

Summary: ?WQ? command unexpectedly can write and save the file in vi
Product: Busybox Reporter: Joe Xie <xhcbrave>
Component: Standard ComplianceAssignee: unassigned
Status: RESOLVED FIXED    
Severity: enhancement CC: busybox-cvs, xhcbrave
Priority: P3 Keywords: FIXME
Version: 1.12.x   
Target Milestone: ---   
Hardware: Other   
OS: Linux   
Host: i686 Target:
Build:
Attachments: Fix.

Description Joe Xie 2009-06-15 09:52:24 UTC
When we use vi command to create file and do some input, then the file can be unexpectedly whitened and saved with capital ":WQ" command. The same issue can be found for ":Q" ":Q!" ":W"
1. use vi command to create some file
>> vi temp.txt
2. input some character in file and use capital ?: WQ? command to exit the vi.
>> :WQ
3. vi exit successfully and the file is saved
Comment 1 Denys Vlasenko 2009-06-15 10:36:17 UTC
Created attachment 399 [details]
Fix.

Confirmed.

Please try attached patch.
Comment 2 Joe Xie 2009-06-16 02:27:20 UTC
Thanks for the fix,but I am sorry that I found this bug in busybox 1.10.2 and the lowest version option is 1.12.x so I selected 1.12.x in the "Version" field.