Delay the access of data->offset until after the null check. This was
reported by 0-day on the kernel version of the script.
Signed-off-by: Gabriel Krisman Bertazi <krisman@collabora.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
static utf8leaf_t *utf8nlookup(const struct utf8data *data,
unsigned char *hangul, const char *s, size_t len)
{
- utf8trie_t *trie = utf8data + data->offset;
+ utf8trie_t *trie;
int offlen;
int offset;
int mask;
return NULL;
if (len == 0)
return NULL;
+
+ trie = utf8data + data->offset;
node = 1;
while (node) {
offlen = (*trie & OFFLEN) >> OFFLEN_SHIFT;