mirror of https://github.com/vitalif/e2fsprogs
Fix clang warning and a resource leak
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Theodore Ts'o <tytso@mit.edu>test-maint
parent
a4f95ccad4
commit
c916e5248b
|
@ -88,7 +88,7 @@ errcode_t ext2fs_symlink(ext2_filsys fs, ext2_ino_t parent, ext2_ino_t ino,
|
|||
} else {
|
||||
/* 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) {
|
||||
/*
|
||||
|
|
|
@ -1852,8 +1852,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,
|
||||
|
|
Loading…
Reference in New Issue