Re: cfdisk: get_string not calculating correct limits with wide ncurses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Monday, July 19, 2010 17:20:31 Karel Zak wrote:
> On Mon, Jul 19, 2010 at 03:15:04PM -0400, Mike Frysinger wrote:
> > if you load up cfdisk and then try to change the partition type, the
> > input field only allows for inputting 1 character instead of the
> > required 2. building against narrow ncurses gives correct behavior.
> > 
> > to reproduce:
> > 	- build util-linux against wide ncurses
> > 	- run cfdisk on a partitioned disk
> > 	- select an existing partition
> > 	- select Type
> > 	- notice that you can only input 1 char
> > 
> > seems like the calculation in get_string() wrt the incoming limit is
> > slightly off, but i'm not familiar enough with this code to propose a
> > correct patch.
> 
>  There was N+1 bug. The original non-wide get_string() function didn't
>  count \0. The "Enter filesystem type:" dialog depended on this broken
>  behavior.
> 
>  The new wide-char code counts also \0, so the bug in the dialog was
>  visible with wide-char support.

thanks, this change seems to work for me
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux