From 2e49d790d24fd544c018b4469b61e5e48d47cada Mon Sep 17 00:00:00 2001 From: onexiaomin Date: Tue, 8 Nov 2022 21:57:29 +0800 Subject: [PATCH 1/2] update to version 10.3 Signed-off-by: onexiaomin --- configure.ac | 2 +- libntfs-3g/runlist.c | 22 +++++++++++++++++----- src/lowntfs-3g.c | 2 +- src/ntfs-3g.c | 2 +- 4 files changed, 20 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 9aa25bd5..3e0c5c50 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 c83c2b7d..cb01e5a7 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 9330500c..e4ff0bf9 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 d8227e71..820733e8 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" -- Gitee From ba04ac22911696307e6e1e15e80d819afdc58780 Mon Sep 17 00:00:00 2001 From: wanghao-free Date: Mon, 21 Nov 2022 00:39:57 -0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=EF=BC=9Aupdate=20version=20number?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Description: update version number Sig:OpenHarmony/third_party_ntfs-3g Feature or Bugfix:Bugfix Binary Source: No Signed-off-by: wanghao-free --- README.OpenSource | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.OpenSource b/README.OpenSource index cd9d498c..63681d59 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." -- Gitee