file-roller/file-roller-libarchive-dont-convert-null-strings.patch

26 lines
837 B
Diff
Raw Normal View History

From 78a608ae8d0058fdf202da5b561c1cbdd937ad99 Mon Sep 17 00:00:00 2001
From: Paolo Bacchilega <paobac@src.gnome.org>
Date: Sat, 18 Feb 2017 08:52:54 +0100
Subject: libarchive: don't convert null strings to utf8
---
src/fr-archive-libarchive.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/fr-archive-libarchive.c b/src/fr-archive-libarchive.c
index 3ac1004..70c07e2 100644
--- a/src/fr-archive-libarchive.c
+++ b/src/fr-archive-libarchive.c
@@ -321,7 +321,7 @@ _g_error_new_from_archive_error (const char *s)
char *msg;
GError *error;
- msg = g_locale_to_utf8 (s, -1, NULL, NULL, NULL);
+ msg = (s != NULL) ? g_locale_to_utf8 (s, -1, NULL, NULL, NULL) : NULL;
if (msg == NULL)
msg = g_strdup ("Fatal error");
error = g_error_new_literal (FR_ERROR, FR_ERROR_COMMAND_ERROR, msg);
--
cgit v0.12