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

Submitted by:  Josh Triplett <joshtriplett>
Submitted on:  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: 
Release:  Bazaar - trunk 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>

 

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
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

     

     

    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 burt@pbjtriplett.org

    Back to the top


    Powered by Savane 3.6