From: "Colin King (gmail)" <colin.i.king@gmail.com>
To: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Cc: ntfs3@lists.linux.dev,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: re: fs/ntfs3: Add option "nocase"
Date: Tue, 4 Oct 2022 22:22:34 +0100 [thread overview]
Message-ID: <5799ca65-df15-274b-3319-984f5e1f0fd3@gmail.com> (raw)
Hi,
Static analysis with clang scan build has detected an issue in the
following commit:
commit a3a956c78efaa202b1d75190136671cf6e87bfbe
Author: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
Date: Fri Sep 23 12:42:18 2022 +0300
fs/ntfs3: Add option "nocase"
The issue is as follows in fs/ntfs3/index.c in function ntfs_d_compare:
/* First try fast implementation. */
for (;;) {
if (!lm--) {
ret = len1 == len2 ? 0 : 1;
goto out;
}
if ((c1 = *n1++) == (c2 = *n2++))
continue;
if (c1 >= 0x80 || c2 >= 0x80)
break;
if (toupper(c1) != toupper(c2)) {
ret = 1;
goto out;
}
}
...
...
out:
__putname(uni1);
return ret;
}
The exits in the for-loop via label out are ending up with __putname()
being called on an uninitialized uni1 pointer.
Colin
reply other threads:[~2022-10-04 21:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=5799ca65-df15-274b-3319-984f5e1f0fd3@gmail.com \
--to=colin.i.king@gmail.com \
--cc=almaz.alexandrovich@paragon-software.com \
--cc=linux-kernel@vger.kernel.org \
--cc=ntfs3@lists.linux.dev \
/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