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: TerminalSeverity: Major
Priority: 5 - NormalItem Group: Software Error
Status: FixedPrivacy: Public
Assigned to: NoneOriginator Name: Josh Triplett
Open/Closed: ClosedRelease: 
Release: Bazaar - trunkReproducibility: 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
  • -unavailable- added by phcoder (Updated the item)
  • -unavailable- added by joshtriplett (Submitted the item)
  • -unavailable- added by joshtriplett
  •  

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

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 30 May 2013 10:59:57 PM UTCphcoderStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Tue 28 May 2013 04:27:06 AM UTCjoshtriplettAttached File-=>Added grub-ctrl-u-ucs4.patch, #28191
      Attached File-=>Added grub-ctrl-u-ucs4.bzr, #28192
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1