bugGNU 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

Tue 28 May 2013 04:27:05 AM UTC, original submission:  

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.

Josh Triplett <joshtriplett>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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
  • -email is unavailable- added by phcoder (Updated the item)
  • -email is unavailable- added by joshtriplett (Submitted the item)
  • -email is unavailable- added by joshtriplett
  •  

    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 StatusNone Fixed
        Open/ClosedOpen 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-

    Back to the top

    Powered by Savane 3.14-3b9d.
    Corresponding source code