Merge branch 'maint' into next

crypto
Theodore Ts'o 2015-01-19 16:37:04 -05:00
commit 560080272f
3 changed files with 9 additions and 3 deletions

View File

@ -20,6 +20,8 @@
#include "e2fsck.h"
#include <pwd.h>
extern e2fsck_t e2fsck_global_ctx; /* Try your very best not to use this! */
struct string {
char *s;
int len;
@ -233,6 +235,8 @@ static FILE *save_output(const char *s0, const char *s1, const char *s2)
}
if (pid == 0) {
if (e2fsck_global_ctx && e2fsck_global_ctx->progress_fd)
close(e2fsck_global_ctx->progress_fd);
if (daemon(0, 0) < 0) {
perror("daemon");
exit(1);

View File

@ -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) {
/*

View File

@ -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,