]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
unicode: add missing check for an error return from utf8lookup()
authorTheodore Ts'o <tytso@mit.edu>
Sun, 12 May 2019 08:56:51 +0000 (04:56 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 12 May 2019 08:56:51 +0000 (04:56 -0400)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: Gabriel Krisman Bertazi <krisman@collabora.com>
fs/unicode/utf8-norm.c

index 20d440c3f2db26a5f1dfe41d6ae8fcca2caac935..801ed6d2ea3788a5c518d86c9336bd573dfe506c 100644 (file)
@@ -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);
                }