summaryrefslogtreecommitdiffstats
path: root/fs/unicode
diff options
context:
space:
mode:
authorTheodore Ts'o2019-05-12 10:56:51 +0200
committerTheodore Ts'o2019-05-12 10:56:51 +0200
commit15f0d8d0bafb0d841dde53af549c4c44b059d7f5 (patch)
treee9bad91cba5827c74c67ed0cc9bb4eb6232b8d6c /fs/unicode
parentext4: fix miscellaneous sparse warnings (diff)
downloadkernel-qcow2-linux-15f0d8d0bafb0d841dde53af549c4c44b059d7f5.tar.gz
kernel-qcow2-linux-15f0d8d0bafb0d841dde53af549c4c44b059d7f5.tar.xz
kernel-qcow2-linux-15f0d8d0bafb0d841dde53af549c4c44b059d7f5.zip
unicode: add missing check for an error return from utf8lookup()
Signed-off-by: Theodore Ts'o <tytso@mit.edu> Cc: Gabriel Krisman Bertazi <krisman@collabora.com>
Diffstat (limited to 'fs/unicode')
-rw-r--r--fs/unicode/utf8-norm.c2
1 files changed, 2 insertions, 0 deletions
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);
}