xfs_db: bit fuzzing should read the right bit when flipping
PATCH 1/1 xfs_db: bit fuzzing should read the right bit when flipping
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 <[email protected]>
--- db/fuzz.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
db/fuzz.c +2 -2
@@ -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; }
Quoted 4 lines · Darrick J. Wong
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 <[email protected]>
Reviewed-by Eric Sandeen <[email protected]>
Quoted 31 lines
--- db/fuzz.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)db/fuzz.c +2
-3@@ -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html