diff --git a/README.OpenSource b/README.OpenSource index cd9d498c5dda733ce8bd96ddf02ed135202d5e28..63681d5939cf264aa29a44fe203fd8b79f2930e8 100644 --- a/README.OpenSource +++ b/README.OpenSource @@ -3,7 +3,7 @@ "Name" : "ntfs-3g", "License" : "GPL-2.0-or-later", "License File" : "COPYING", - "Version Number" : "2022.5.17", + "Version Number" : "2022.10.03", "Owner" : "Jean-Pierre Andre, Alon Bar-Lev, Martin Bene, Dominique L Bouix, Csaba Henk, Bernhard Kaindl, Erik Larsson, Alejandro Pulver, Szabolcs Szakacsits, Miklos Szeredi", "Upstream URL" : "https://github.com/tuxera/ntfs-3g", "Description" : "The NTFS-3G driver is an open source, freely available read/write NTFS driver for Linux, FreeBSD, macOS, NetBSD, OpenIndiana, QNX and Haiku. It provides safe and fast handling of the Windows XP, Windows Server 2003, Windows 2000, Windows Vista, Windows Server 2008, Windows 7, Windows 8, Windows Server 2012, Windows Server 2016, Windows 10 and Windows Server 2019 NTFS file systems." diff --git a/configure.ac b/configure.ac index 9aa25bd593dbd1cb451ae740991df9b5a857efc1..3e0c5c507fa368b856980f9c06337261f37d7ecb 100644 --- a/configure.ac +++ b/configure.ac @@ -24,7 +24,7 @@ # Autoconf AC_PREREQ(2.59) -AC_INIT([ntfs-3g],[2022.5.17],[ntfs-3g-devel@lists.sf.net]) +AC_INIT([ntfs-3g],[2022.10.3],[ntfs-3g-devel@lists.sf.net]) LIBNTFS_3G_VERSION="89" AC_CONFIG_SRCDIR([src/ntfs-3g.c]) diff --git a/libntfs-3g/runlist.c b/libntfs-3g/runlist.c index c83c2b7dda5fd4dec068d725ef1032be2e4395bf..cb01e5a77efa57e8ddd2d6508a6b977332903eed 100644 --- a/libntfs-3g/runlist.c +++ b/libntfs-3g/runlist.c @@ -5,7 +5,7 @@ * Copyright (c) 2002-2005 Richard Russon * Copyright (c) 2002-2008 Szabolcs Szakacsits * Copyright (c) 2004 Yura Pakhuchiy - * Copyright (c) 2007-2010 Jean-Pierre Andre + * Copyright (c) 2007-2022 Jean-Pierre Andre * * This program/include file is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License as published @@ -918,11 +918,18 @@ static runlist_element *ntfs_mapping_pairs_decompress_i(const ntfs_volume *vol, "array.\n"); goto err_out; } + /* chkdsk accepts zero-sized runs only for holes */ + if ((lcn != (LCN)-1) && !rl[rlpos].length) { + ntfs_log_debug( + "Invalid zero-sized data run.\n"); + goto err_out; + } /* Enter the current lcn into the runlist element. */ rl[rlpos].lcn = lcn; } - /* Get to the next runlist element. */ - rlpos++; + /* Get to the next runlist element, skipping zero-sized holes */ + if (rl[rlpos].length) + rlpos++; /* Increment the buffer position to the next mapping pair. */ buf += (*buf & 0xf) + ((*buf >> 4) & 0xf) + 1; } @@ -987,13 +994,18 @@ mpa_err: rl[rlpos].vcn = vcn; rl[rlpos].length = (s64)0; /* If no existing runlist was specified, we are done. */ - if (!old_rl) { + if (!old_rl || !old_rl[0].length) { ntfs_log_debug("Mapping pairs array successfully decompressed:\n"); ntfs_debug_runlist_dump(rl); + if (old_rl) + free(old_rl); return rl; } /* Now combine the new and old runlists checking for overlaps. */ - old_rl = ntfs_runlists_merge(old_rl, rl); + if (rl[0].length) + old_rl = ntfs_runlists_merge(old_rl, rl); + else + free(rl); if (old_rl) return old_rl; err = errno; diff --git a/src/lowntfs-3g.c b/src/lowntfs-3g.c index 9330500c9f4f5de9583f28641008d7932c263418..e4ff0bf9101eab73d67a94ebcda26e4721a2f0aa 100644 --- a/src/lowntfs-3g.c +++ b/src/lowntfs-3g.c @@ -262,7 +262,7 @@ static const char *usage_msg = "\n" "Copyright (C) 2005-2007 Yura Pakhuchiy\n" "Copyright (C) 2006-2009 Szabolcs Szakacsits\n" -"Copyright (C) 2007-2021 Jean-Pierre Andre\n" +"Copyright (C) 2007-2022 Jean-Pierre Andre\n" "Copyright (C) 2009-2020 Erik Larsson\n" "\n" "Usage: %s [-o option[,...]] \n" diff --git a/src/ntfs-3g.c b/src/ntfs-3g.c index d8227e71730166e1e61c2c7e3c4d9f533524ab1e..820733e85945d6724da323c3b13d4b76582a9881 100644 --- a/src/ntfs-3g.c +++ b/src/ntfs-3g.c @@ -197,7 +197,7 @@ static const char *usage_msg = "\n" "Copyright (C) 2005-2007 Yura Pakhuchiy\n" "Copyright (C) 2006-2009 Szabolcs Szakacsits\n" -"Copyright (C) 2007-2021 Jean-Pierre Andre\n" +"Copyright (C) 2007-2022 Jean-Pierre Andre\n" "Copyright (C) 2009-2020 Erik Larsson\n" "\n" "Usage: %s [-o option[,...]] \n"