Bug 397 - ?WQ? command unexpectedly can write and save the file in vi
Summary: ?WQ? command unexpectedly can write and save the file in vi
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Standard Compliance (show other bugs)
Version: 1.12.x
Hardware: Other Linux
: P3 enhancement
Target Milestone: ---
Assignee: unassigned
URL:
Keywords: FIXME
Depends on:
Blocks:
 
Reported: 2009-06-15 09:52 UTC by Joe Xie
Modified: 2009-07-12 21:58 UTC (History)
2 users (show)

See Also:
Host: i686
Target:
Build:


Attachments
Fix. (7.67 KB, patch)
2009-06-15 10:36 UTC, Denys Vlasenko
Details

Note You need to log in before you can comment on or make changes to this bug.
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.