GNU GRUB - Bugs: bug #39091, Ctrl-U copies byte-truncated UCS-4...
You are not allowed to post comments on this tracker with your current authentication level.
bug #39091: Ctrl-U copies byte-truncated UCS-4 to the kill buffer
Submitter: | Josh Triplett <joshtriplett> | ||
Submitted: | Tue 28 May 2013 04:27:05 AM UTC | ||
Category: | Terminal | Severity: | Major |
Priority: | 5 - Normal | Item Group: | Software Error |
Status: | Fixed | Privacy: | Public |
Assigned to: | None | Originator Name: | Josh Triplett |
Open/Closed: | Closed | Release: | Bazaar - trunk |
Release: | Reproducibility: | Every Time | |
Planned Release: | None |
Attached Files
file #28191: grub-ctrl-u-ucs4.patch added by joshtriplett (599B - text/x-diff - Patch in standard patch form and in "bzr send" form.)
file #28192: grub-ctrl-u-ucs4.bzr added by joshtriplett (3KiB - application/octet-stream - Patch in standard patch form and in "bzr send" form.)
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 5 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2013-05-30 | phcoder | Status | None | Fixed | |
Open/Closed | Open | Closed | |||
2013-05-28 | joshtriplett | Attached File | - | Added grub-ctrl-u-ucs4.patch, #28191 | |
Attached File | - | Added grub-ctrl-u-ucs4.bzr, #28192 | |||
Carbon-Copy | - | Added -email is unavailable- |
Powered by Savane 3.13-4448.
Corresponding source code
Hitting Ctrl-U deletes to the beginning of the line, but hitting Ctrl-Y
afterward yanks a truncated and mangled string. Looking at the
code (in grub-core/normal/cmdline.c), it looks like the implementation
of Ctrl-U never got converted from 8-bit characters to UCS-4, so it only
copies N bytes rather than N characters. The attached patch fixes this
problem.
Changelog entry for this patch:
2013-05-27 Josh Triplett <josh@joshtriplett.org>
* grub-core/normal/cmdline.c (grub_cmdline_get): Fix Ctrl-u
handling to copy the killed characters to the kill buffer as
UCS4 stored as grub_uint32_t rather than as 8-bit characters
stored as char. Eliminates UCS4 truncation and corruption
observed when killing characters with Ctrl-u and yanking them
back with Ctrl-y.
I've also attached the patch in "bzr send" form for direct application,
including the changelog entry.