@@ -112,7 +112,7 @@ need_block:
ext2fs_iblk_set(fs, &inode, 1);
/* Slow symlinks, target stored in the first block */
memset(block_buf, 0, fs->blocksize);
- strcpy(block_buf, target);
+ strncpy(block_buf, target, fs->blocksize);
if (fs->super->s_feature_incompat &
EXT3_FEATURE_INCOMPAT_EXTENTS) {
/*
@@ -273,7 +273,7 @@ int process_fs(const char *fsname)
if ((rand() % 2) && c < 128)
c |= 0x80;
if (verbose)
- printf("Corrupting byte %jd in block %jd to 0x%x\n",
+ printf("Corrupting byte %zu in block %zu to 0x%x\n",
off % fs->blocksize, off / fs->blocksize, c);
if (dryrun)
continue;
@@ -2311,8 +2311,10 @@ static errcode_t move_itables(ext2_resize_t rfs)
ext2fs_inode_table_loc(fs, i))
to_move++;
- if (to_move == 0)
- return 0;
+ if (to_move == 0) {
+ retval = 0;
+ goto errout;
+ }
if (rfs->progress) {
retval = rfs->progress(rfs, E2_RSZ_MOVE_ITABLE_PASS,
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> --- lib/ext2fs/symlink.c | 2 +- misc/e2fuzz.c | 2 +- resize/resize2fs.c | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html