|
|
3dab36 |
From 0f5084e07c215d74adc4eeeda40b374855cce59a Mon Sep 17 00:00:00 2001
|
|
|
3dab36 |
From: fujiwarat <takao.fujiwara1@gmail.com>
|
|
|
3dab36 |
Date: Fri, 11 Jan 2019 12:56:42 +0900
|
|
|
3dab36 |
Subject: [PATCH] src/ibuscomposetable: Replace assert with warning for
|
|
|
3dab36 |
.XCompose
|
|
|
3dab36 |
|
|
|
3dab36 |
BUG=rhbz#1470673
|
|
|
3dab36 |
---
|
|
|
3dab36 |
src/ibuscomposetable.c | 12 +++++++-----
|
|
|
3dab36 |
1 file changed, 7 insertions(+), 5 deletions(-)
|
|
|
3dab36 |
|
|
|
3dab36 |
diff --git a/src/ibuscomposetable.c b/src/ibuscomposetable.c
|
|
|
3dab36 |
index b843e7e1..1c0ece41 100644
|
|
|
3dab36 |
--- a/src/ibuscomposetable.c
|
|
|
3dab36 |
+++ b/src/ibuscomposetable.c
|
|
|
3dab36 |
@@ -1,7 +1,7 @@
|
|
|
3dab36 |
/* -*- mode: C; c-basic-offset: 4; indent-tabs-mode: nil; -*- */
|
|
|
3dab36 |
/* ibus - The Input Bus
|
|
|
3dab36 |
* Copyright (C) 2013-2014 Peng Huang <shawn.p.huang@gmail.com>
|
|
|
3dab36 |
- * Copyright (C) 2013-2018 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
|
|
3dab36 |
+ * Copyright (C) 2013-2019 Takao Fujiwara <takao.fujiwara1@gmail.com>
|
|
|
3dab36 |
*
|
|
|
3dab36 |
* This library is free software; you can redistribute it and/or
|
|
|
3dab36 |
* modify it under the terms of the GNU Lesser General Public
|
|
|
3dab36 |
@@ -98,14 +98,16 @@ parse_compose_value (IBusComposeData *compose_data,
|
|
|
3dab36 |
uch = words[1][1];
|
|
|
3dab36 |
|
|
|
3dab36 |
/* The escaped string "\"" is separated with '\\' and '"'. */
|
|
|
3dab36 |
- if (uch == '\0' && words[2][0] == '"')
|
|
|
3dab36 |
+ if (uch == '\0' && words[2][0] == '"') {
|
|
|
3dab36 |
uch = '"';
|
|
|
3dab36 |
/* The escaped octal */
|
|
|
3dab36 |
- else if (uch >= '0' && uch <= '8')
|
|
|
3dab36 |
+ } else if (uch >= '0' && uch <= '8') {
|
|
|
3dab36 |
uch = g_ascii_strtoll(words[1] + 1, NULL, 8);
|
|
|
3dab36 |
/* If we need to handle other escape sequences. */
|
|
|
3dab36 |
- else if (uch != '\\')
|
|
|
3dab36 |
- g_assert_not_reached ();
|
|
|
3dab36 |
+ } else if (uch != '\\') {
|
|
|
3dab36 |
+ g_warning ("Invalid backslash: %s: %s", val, line);
|
|
|
3dab36 |
+ goto fail;
|
|
|
3dab36 |
+ }
|
|
|
3dab36 |
}
|
|
|
3dab36 |
|
|
|
3dab36 |
if (g_utf8_get_char (g_utf8_next_char (words[1])) > 0) {
|
|
|
3dab36 |
--
|
|
|
3dab36 |
2.21.0
|
|
|
3dab36 |
|