forked from jeremie-koenig/genext2fs
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
debian/patches/byteswap_fix.diff: Fix a segfault on little-endian archs
- Loading branch information
1 parent
3b1a68d
commit b2c78f8
Showing
3 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,11 @@ | ||
genext2fs (1.4.1-4) UNRELEASED; urgency=low | ||
|
||
* debian/patches/byteswap_fix.diff: New patch by Samuel Thibault, | ||
fix a segfault in the byte swapping code on little-endian architectures | ||
(closes: 644776). | ||
|
||
-- Jérémie Koenig <[email protected]> Tue, 29 Nov 2011 17:18:12 +0100 | ||
|
||
genext2fs (1.4.1-3) unstable; urgency=low | ||
|
||
* New maintainer (closes: 579369). | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
Index: genext2fs/genext2fs.c | ||
=================================================================== | ||
--- genext2fs.orig/genext2fs.c 2011-11-29 17:36:06.000000000 +0100 | ||
+++ genext2fs/genext2fs.c 2011-11-29 17:37:37.000000000 +0100 | ||
@@ -1779,7 +1779,8 @@ | ||
assert(nod->i_block[EXT2_DIND_BLOCK] != 0); | ||
for(i = 0; i < BLOCKSIZE/4; i++) | ||
if(nblk > EXT2_IND_BLOCK + BLOCKSIZE/4 + (BLOCKSIZE/4)*i ) | ||
- swap_block(get_blk(fs, ((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i])); | ||
+ if (((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i]) | ||
+ swap_block(get_blk(fs, ((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i])); | ||
swap_block(get_blk(fs, nod->i_block[EXT2_DIND_BLOCK])); | ||
if(nblk <= EXT2_IND_BLOCK + BLOCKSIZE/4 + BLOCKSIZE/4 * BLOCKSIZE/4) | ||
return; | ||
@@ -1792,7 +1793,8 @@ | ||
(BLOCKSIZE/4)*(BLOCKSIZE/4) + | ||
i*(BLOCKSIZE/4)*(BLOCKSIZE/4) + | ||
j*(BLOCKSIZE/4)) ) | ||
- swap_block(get_blk(fs,b2[j])); | ||
+ if (b2[j]) | ||
+ swap_block(get_blk(fs,b2[j])); | ||
else { | ||
done = 1; | ||
break; | ||
@@ -1825,7 +1827,8 @@ | ||
swap_block(get_blk(fs, nod->i_block[EXT2_DIND_BLOCK])); | ||
for(i = 0; i < BLOCKSIZE/4; i++) | ||
if(nblk > EXT2_IND_BLOCK + BLOCKSIZE/4 + (BLOCKSIZE/4)*i ) | ||
- swap_block(get_blk(fs, ((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i])); | ||
+ if (((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i]) | ||
+ swap_block(get_blk(fs, ((uint32*)get_blk(fs, nod->i_block[EXT2_DIND_BLOCK]))[i])); | ||
if(nblk <= EXT2_IND_BLOCK + BLOCKSIZE/4 + BLOCKSIZE/4 * BLOCKSIZE/4) | ||
return; | ||
/* Adding support for triple indirection */ | ||
@@ -1839,7 +1842,8 @@ | ||
(BLOCKSIZE/4)*(BLOCKSIZE/4) + | ||
i*(BLOCKSIZE/4)*(BLOCKSIZE/4) + | ||
j*(BLOCKSIZE/4)) ) | ||
- swap_block(get_blk(fs,b2[j])); | ||
+ if (b2[j]) | ||
+ swap_block(get_blk(fs,b2[j])); | ||
else { | ||
done = 1; | ||
break; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
c99_scanf.diff | ||
autoconf.diff | ||
blocksize+creator.diff | ||
byteswap_fix.diff |