Skip to content

Commit

Permalink
fix: ino_extract_regular: do not decrement got
Browse files Browse the repository at this point in the history
* this a regression introduced in commit f2a1a24, which
  caused the ino_extract_regular() function to decrement
  the 'got' variable, thus makes the loop exits and leaves
  unextracted data for files size > 1 << 27.
* correct the build date.

Signed-off-by: svoboda18 <[email protected]>
  • Loading branch information
svoboda18 committed Jun 15, 2024
1 parent f2a1a24 commit c1c4cc2
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
13 changes: 12 additions & 1 deletion e2fstool.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,6 @@ errcode_t ino_extract_regular(ext2_filsys fs, ext2_ino_t ino, const char *path)
goto close;
}

got -= nbytes;
written += nbytes;
} while (got);

Expand Down Expand Up @@ -578,6 +577,7 @@ static errcode_t walk_fs(ext2_filsys fs)
return retval;
}
}

if (android_configure)
{
if (mountpoint)
Expand Down Expand Up @@ -633,6 +633,17 @@ static errcode_t walk_fs(ext2_filsys fs)
goto end;
}

#ifdef SVB_MINGW
if (!android_configure_only)
{
retval = set_path_timestamp(out_dir, inode.i_atime, inode.i_mtime, inode.i_ctime);
if (retval)
{
E2FSTOOL_ERROR("while configuring timestamps for %s", out_dir);
}
}
#endif

if (!quiet && !verbose)
ext2fs_numeric_progress_close(fs, &progress, "done\n");
end:
Expand Down
2 changes: 1 addition & 1 deletion e2fstool.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#include <private/android_filesystem_capability.h>

#define E2FSTOOL_VERSION "1.0.0"
#define E2FSTOOL_DATE "16-July-2024"
#define E2FSTOOL_DATE "15-July-2024"

#define E2FSTOOL_ERROR(pfx, ...) printf("%s: %s " pfx "\n", __func__, strerror(errno) __VA_OPT__(,) __VA_ARGS__)

Expand Down

0 comments on commit c1c4cc2

Please sign in to comment.