Skip to content

Commit 15f0d8d

Browse files
committed
unicode: add missing check for an error return from utf8lookup()
Signed-off-by: Theodore Ts'o <[email protected]> Cc: Gabriel Krisman Bertazi <[email protected]>
1 parent 0ba33fa commit 15f0d8d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/unicode/utf8-norm.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -714,6 +714,8 @@ int utf8byte(struct utf8cursor *u8c)
714714
}
715715

716716
leaf = utf8lookup(u8c->data, u8c->hangul, u8c->s);
717+
if (!leaf)
718+
return -1;
717719
ccc = LEAF_CCC(leaf);
718720
}
719721

0 commit comments

Comments
 (0)