From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs <linux-xfs@vger.kernel.org>
Subject: [PATCH] xfs_db: bit fuzzing should read the right bit when flipping
Date: Sat, 19 Aug 2017 08:32:11 -0700 [thread overview]
Message-ID: <20170819153210.GR4796@magnolia> (raw)
The middle and last bit flip fuzz verbs need to read the same bit that
they're trying to set.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
db/fuzz.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/db/fuzz.c b/db/fuzz.c
index 53cedbc..d0d78a9 100644
--- a/db/fuzz.c
+++ b/db/fuzz.c
@@ -226,7 +226,7 @@ fuzz_lastbit(
int nbits)
{
setbit_l((char *)buf, bitoff + nbits - 1,
- !getbit_l((char *)buf, bitoff));
+ !getbit_l((char *)buf, bitoff + nbits - 1));
return true;
}
@@ -238,7 +238,7 @@ fuzz_middlebit(
int nbits)
{
setbit_l((char *)buf, bitoff + nbits / 2,
- !getbit_l((char *)buf, bitoff));
+ !getbit_l((char *)buf, bitoff + nbits / 2));
return true;
}
next reply other threads:[~2017-08-19 15:32 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-19 15:32 Darrick J. Wong [this message]
2017-08-21 18:44 ` [PATCH] xfs_db: bit fuzzing should read the right bit when flipping Eric Sandeen
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=20170819153210.GR4796@magnolia \
--to=darrick.wong@oracle.com \
--cc=linux-xfs@vger.kernel.org \
--cc=sandeen@redhat.com \
/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