GNU bug report logs - #15591
gpt mishandles non ascii partition names

Previous Next

Package: parted;

Reported by: Phillip Susi <psusi <at> ubuntu.com>

Date: Fri, 11 Oct 2013 19:00:02 UTC

Severity: normal

Merged with 15597

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Phillip Susi <psusi <at> ubuntu.com>
Cc: 15591 <at> debbugs.gnu.org
Subject: bug#15591: [PATCH] libparted: handle i18n gpt partition names correctly
Date: Thu, 19 Dec 2013 14:13:45 -0800
On Thu, Dec 19, 2013 at 1:25 PM, Phillip Susi <psusi <at> ubuntu.com> wrote:
> gpt.c was simply truncating the UTF-16 characters stored
> in the partition name field to 8 bits.  This corrupted non
> ascii characters which later resulted in parted crashing in
> strlist.c trying to convert the now invalid multi byte
> characters to wchar.
>
> gpt.c will now properly convert the UTF-16 to the current
> locale encoding.

Hi Philip,

Thanks for fixing that.  Your patch looks good.

One nit:
> +  gpt_part_data->translated_name = strdup(name);

Would you please adjust that to handle strdup failure?
Perhaps just by using xstrdup in place of strdup.

Also, it'd be great to add a test case that fails without this fix?

Thanks,
Jim




This bug report was last modified 11 years and 154 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.