linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] unicode: add missing check for an error return from utf8lookup()
@ 2019-05-12  8:57 Theodore Ts'o
  2019-05-12 21:18 ` Gabriel Krisman Bertazi
  0 siblings, 1 reply; 2+ messages in thread
From: Theodore Ts'o @ 2019-05-12  8:57 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Theodore Ts'o, Gabriel Krisman Bertazi

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: Gabriel Krisman Bertazi <krisman@collabora.com>
---
 fs/unicode/utf8-norm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/unicode/utf8-norm.c b/fs/unicode/utf8-norm.c
index 20d440c3f2db..801ed6d2ea37 100644
--- a/fs/unicode/utf8-norm.c
+++ b/fs/unicode/utf8-norm.c
@@ -714,6 +714,8 @@ int utf8byte(struct utf8cursor *u8c)
 			}
 
 			leaf = utf8lookup(u8c->data, u8c->hangul, u8c->s);
+			if (!leaf)
+				return -1;
 			ccc = LEAF_CCC(leaf);
 		}
 
-- 
2.19.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-12 21:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-12  8:57 [PATCH] unicode: add missing check for an error return from utf8lookup() Theodore Ts'o
2019-05-12 21:18 ` Gabriel Krisman Bertazi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).