ngompa / rpms / PackageKit

Forked from rpms/PackageKit 4 years ago
Clone

Blame SOURCES/0001-Make-pk_console_get_prompt-big-endian-safe.patch

ae7249
From 710a9445777793e49160587882860cbb7b43e311 Mon Sep 17 00:00:00 2001
ae7249
From: Richard Hughes <richard@hughsie.com>
ae7249
Date: Mon, 16 May 2016 15:27:35 +0100
ae7249
Subject: [PATCH] Make pk_console_get_prompt() big endian safe
ae7249
ae7249
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1255079
ae7249
---
ae7249
 lib/packagekit-glib2/pk-console-shared.c | 3 ++-
ae7249
 1 file changed, 2 insertions(+), 1 deletion(-)
ae7249
ae7249
diff --git a/lib/packagekit-glib2/pk-console-shared.c b/lib/packagekit-glib2/pk-console-shared.c
ae7249
index 66cb372..d61f3a1 100644
ae7249
--- a/lib/packagekit-glib2/pk-console-shared.c
ae7249
+++ b/lib/packagekit-glib2/pk-console-shared.c
ae7249
@@ -116,7 +116,8 @@ pk_readline_unbuffered (const gchar *prompt)
ae7249
 			g_warning ("Got unexpected EOF.");
ae7249
 			break;
ae7249
 		} else {
ae7249
-			g_string_append_len (str, (const gchar *) &c, 1);
ae7249
+			gchar c_safe = (gchar) c;
ae7249
+			g_string_append_len (str, (const gchar *) &c_safe, 1);
ae7249
 		}
ae7249
 	}
ae7249
 	tcsetattr (fileno (tty), TCSAFLUSH, &ots;;
ae7249
-- 
ae7249
2.7.4
ae7249