Thread (2 messages) 2 messages, 2 authors, 2017-08-21

Re: [PATCH] xfs_db: bit fuzzing should read the right bit when flipping

From: Eric Sandeen <hidden>
Date: 2017-08-21 18:44:56

On 8/19/17 10:32 AM, Darrick J. Wong wrote:
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 <redacted>
Reviewed-by: Eric Sandeen <redacted>
quoted hunk ↗ jump to hunk
---
 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;
 }
 
--
To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help