Fix to allocate compose output buffer with more than two chars

This commit is contained in:
Takao Fujiwara 2019-10-04 20:50:15 +09:00
parent 698c8ecd06
commit d2b4f54f21
2 changed files with 34 additions and 1 deletions

View File

@ -173,3 +173,33 @@ index 3a626230..2439de14 100644
--
2.21.0
From 773420fad23078ceef83e8ae84bba4e139d0bea3 Mon Sep 17 00:00:00 2001
From: fujiwarat <takao.fujiwara1@gmail.com>
Date: Thu, 19 Sep 2019 17:09:46 +0900
Subject: [PATCH] src: Fix to allocate compose output buffer with more than two
chars
If the compose output chars are more than two, IBusCompose calls
g_renew() but the size is not enough to insert '\0'.
BUG=https://github.com/ibus/ibus/issues/2123
---
src/ibuscomposetable.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ibuscomposetable.c b/src/ibuscomposetable.c
index 5fd37f10..dd9d31d4 100644
--- a/src/ibuscomposetable.c
+++ b/src/ibuscomposetable.c
@@ -148,7 +148,7 @@ parse_compose_value (IBusComposeData *compose_data,
} else {
compose_data->values = g_renew (gunichar,
compose_data->values,
- n_uchars + 1);
+ n_uchars + 2);
}
compose_data->values[n_uchars++] = *up;
}
--
2.21.0

View File

@ -35,7 +35,7 @@
Name: ibus
Version: 1.5.21
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Intelligent Input Bus for Linux OS
License: LGPLv2+
URL: https://github.com/ibus/%name/wiki
@ -461,6 +461,9 @@ dconf update || :
%{_datadir}/installed-tests/ibus
%changelog
* Fri Oct 04 2019 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.21-3
- Fix to allocate compose output buffer with more than two chars
* Fri Sep 13 2019 Takao Fujiwara <tfujiwar@redhat.com> - 1.5.21-2
- Fix #1751940 - CVE-2019-14822 GDBusServer peer authorization