From: "Theodore Ts'o" <tytso@mit.edu>
To: Ext4 Developers List <linux-ext4@vger.kernel.org>
Cc: "Theodore Ts'o" <tytso@mit.edu>,
Gabriel Krisman Bertazi <krisman@collabora.com>
Subject: [PATCH] libext2fs: add missing check for utf8lookup()'s return value
Date: Fri, 10 May 2019 14:20:53 -0400 [thread overview]
Message-ID: <20190510182053.23819-1-tytso@mit.edu> (raw)
Fixes-Coverity-Bug: 1442630
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: Gabriel Krisman Bertazi <krisman@collabora.com>
---
lib/ext2fs/nls_utf8.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/lib/ext2fs/nls_utf8.c b/lib/ext2fs/nls_utf8.c
index 42148099a..e4c4e7a30 100644
--- a/lib/ext2fs/nls_utf8.c
+++ b/lib/ext2fs/nls_utf8.c
@@ -789,6 +789,8 @@ static int utf8byte(struct utf8cursor *u8c)
}
leaf = utf8lookup(u8c->data, u8c->hangul, u8c->s);
+ if (!leaf)
+ return -1;
ccc = LEAF_CCC(leaf);
}
--
2.19.1
next reply other threads:[~2019-05-10 18:21 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-10 18:20 Theodore Ts'o [this message]
2019-05-12 2:38 ` [PATCH] libext2fs: add missing check for utf8lookup()'s return value Gabriel Krisman Bertazi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190510182053.23819-1-tytso@mit.edu \
--to=tytso@mit.edu \
--cc=krisman@collabora.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).