[parted-devel] [PATCH] Fix crash when localized
Brian C. Lane
bcl at redhat.com
Tue Feb 2 23:56:54 UTC 2016
On Tue, Feb 02, 2016 at 03:07:15PM -0500, Phillip Susi wrote:
> The _() macro is only for translating string literals. It was
> incorrectly applied to a runtime string representing the name
> of a partition and this sometimes caused a gettext crash.
> ---
> NEWS | 1 +
> parted/parted.c | 2 +-
> 2 files changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/NEWS b/NEWS
> index 96135ed..1e7839e 100644
> --- a/NEWS
> +++ b/NEWS
> @@ -3,6 +3,7 @@ GNU parted NEWS -*- outline -*-
> * Noteworthy changes in release ?.? (????-??-??) [?]
>
> ** Bug Fixes
> + Fix a gettext crash/error sometimes when using localized languages.
>
> Use 512b sector size when communicating with device-mapper. Fixes
> problems with partitions being created too small on dm devices
> diff --git a/parted/parted.c b/parted/parted.c
> index a9426c4..e4b51a8 100644
> --- a/parted/parted.c
> +++ b/parted/parted.c
> @@ -1269,7 +1269,7 @@ do_print (PedDevice** dev, PedDisk** diskp)
> putchar (':');
>
> if (has_name)
> - printf ("%s:", _(ped_partition_get_name (part)));
> + printf ("%s:", ped_partition_get_name (part));
> else
> putchar (':');
>
> --
> 1.9.1
>
>
ACK.
--
Brian C. Lane | Anaconda Team | IRC: bcl #anaconda | Port Orchard, WA (PST8PDT)
More information about the parted-devel
mailing list