Whamcloud - gitweb
git://git.whamcloud.com
/
tools
/
e2fsprogs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
df5487a
)
libext2fs: avoid pointer arithmetic on `void *`
author
Michael Forney
<mforney@mforney.org>
Sun, 5 Apr 2020 04:53:46 +0000
(21:53 -0700)
committer
Theodore Ts'o
<tytso@mit.edu>
Tue, 14 Apr 2020 01:58:21 +0000
(21:58 -0400)
The pointer operand to the binary `+` operator must be to a complete
object type.
Signed-off-by: Michael Forney <mforney@mforney.org>
Reviewed-by: Andreas Dilger <adilger@dilger.ca>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
lib/ext2fs/csum.c
patch
|
blob
|
history
diff --git
a/lib/ext2fs/csum.c
b/lib/ext2fs/csum.c
index
a717258
..
54b53a3
100644
(file)
--- a/
lib/ext2fs/csum.c
+++ b/
lib/ext2fs/csum.c
@@
-274,7
+274,7
@@
static errcode_t __get_dirent_tail(ext2_filsys fs,
rec_len = translate(d->rec_len);
}
- if ((
void *)d > ((void
*)dirent + fs->blocksize))
+ if ((
char *)d > ((char
*)dirent + fs->blocksize))
return EXT2_ET_DIR_CORRUPTED;
if (d != top)
return EXT2_ET_DIR_NO_SPACE_FOR_CSUM;