diff --git a/0001-Fix-failure-crash-of-sgdisk-when-compiled-with-lates.patch b/0001-Fix-failure-crash-of-sgdisk-when-compiled-with-lates.patch deleted file mode 100644 index a220660246555ae14d726da0fd02ef2d2ec46b78..0000000000000000000000000000000000000000 --- a/0001-Fix-failure-crash-of-sgdisk-when-compiled-with-lates.patch +++ /dev/null @@ -1,28 +0,0 @@ -From 5d5e76d369a412bfb3d2cebb5fc0a7509cef878d Mon Sep 17 00:00:00 2001 -From: Rod Smith -Date: Fri, 15 Apr 2022 18:10:14 -0400 -Subject: [PATCH] Fix failure & crash of sgdisk when compiled with latest popt - (commit 740; presumably eventually release 1.19) - -Conflict:no -Reference:https://sourceforge.net/p/gptfdisk/code/ci/5d5e76d369a412bfb3d2cebb5fc0a7509cef878d ---- - gptcl.cc | 2 +- - 1 files changed, 1 insertions(+), 1 deletions(-) - -diff --git a/gptcl.cc b/gptcl.cc -index 34c9421..0d578eb 100644 ---- a/gptcl.cc -+++ b/gptcl.cc -@@ -155,7 +155,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { - } // while - - // Assume first non-option argument is the device filename.... -- device = (char*) poptGetArg(poptCon); -+ device = strdup((char*) poptGetArg(poptCon)); - poptResetContext(poptCon); - - if (device != NULL) { --- -2.33.0 - diff --git a/0002-Fix-NULL-dereference-when-duplicating-string-argumen.patch b/0002-Fix-NULL-dereference-when-duplicating-string-argumen.patch deleted file mode 100644 index f852fc871ae5dbccf136f822f524a43f76a85354..0000000000000000000000000000000000000000 --- a/0002-Fix-NULL-dereference-when-duplicating-string-argumen.patch +++ /dev/null @@ -1,43 +0,0 @@ -From f5de3401b974ce103ffd93af8f9d43505a04aaf9 Mon Sep 17 00:00:00 2001 -From: Damian Kurek -Date: Thu, 7 Jul 2022 03:39:16 +0000 -Subject: [PATCH] Fix NULL dereference when duplicating string argument - -poptGetArg can return NULL if there are no additional arguments, which -makes strdup dereference NULL on strlen - -Conflict:no -Reference:https://sourceforge.net/p/gptfdisk/code/ci/f5de3401b974ce103ffd93af8f9d43505a04aaf9 ---- - gptcl.cc | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/gptcl.cc b/gptcl.cc -index 0d578eb..ab95239 100644 ---- a/gptcl.cc -+++ b/gptcl.cc -@@ -155,10 +155,11 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { - } // while - - // Assume first non-option argument is the device filename.... -- device = strdup((char*) poptGetArg(poptCon)); -- poptResetContext(poptCon); -+ device = (char*) poptGetArg(poptCon); - - if (device != NULL) { -+ device = strdup(device); -+ poptResetContext(poptCon); - JustLooking(); // reset as necessary - BeQuiet(); // Tell called functions to be less verbose & interactive - if (LoadPartitions((string) device)) { -@@ -498,6 +499,7 @@ int GPTDataCL::DoOptions(int argc, char* argv[]) { - cerr << "Error encountered; not saving changes.\n"; - retval = 4; - } // if -+ free(device); - } // if (device != NULL) - poptFreeContext(poptCon); - return retval; --- -2.33.0 - diff --git a/gdisk.spec b/gdisk.spec index 81e738e301436256eddb186eb029744d3b591f76..72784d759ce9168f2ec12d1c09cd7d449e8130a8 100644 --- a/gdisk.spec +++ b/gdisk.spec @@ -1,6 +1,6 @@ Name: gdisk -Version: 1.0.9 -Release: 2 +Version: 1.0.10 +Release: 1 Summary: GPT fdisk(consisting of the gdisk,sgdisk,cgdisk) is a set of text-mode partitioning tools License: GPLv2 URL: http://www.rodsbooks.com/gdisk @@ -8,9 +8,6 @@ Source0: http://downloads.sourceforge.net/gptfdisk/gptfdisk-%{version}.tar.gz BuildRequires:ncurses-devel util-linux-devel gcc-c++ popt-devel -Patch0001: 0001-Fix-failure-crash-of-sgdisk-when-compiled-with-lates.patch -Patch0002: 0002-Fix-NULL-dereference-when-duplicating-string-argumen.patch - %description GPT fdisk(consisting of the gdisk,sgdisk,cgdisk) is a set of text-mode partitioning tools. rather than on the older MBR partition tables. @@ -51,6 +48,9 @@ install -Dp -m 0644 fixparts.8 %{buildroot}%{_mandir}/man8/fixparts.8 %{_mandir}/man8/* %changelog +* Tue Oct 15 2024 lvyy - 1.0.10-1 +- update to gptfdisk-1.0.10 + * Tue Sep 24 2024 lvyy - 1.0.9-2 - DESC: fix problem that caused sgdisk to crash when using the latest popt diff --git a/gptfdisk-1.0.10.tar.gz b/gptfdisk-1.0.10.tar.gz new file mode 100644 index 0000000000000000000000000000000000000000..7c5c42b3d107c24693fba3af0d43c78eba5ce103 Binary files /dev/null and b/gptfdisk-1.0.10.tar.gz differ diff --git a/gptfdisk-1.0.9.tar.gz b/gptfdisk-1.0.9.tar.gz deleted file mode 100644 index daf94814a090b8b0f6af668626ba18643ca9ce6e..0000000000000000000000000000000000000000 Binary files a/gptfdisk-1.0.9.tar.gz and /dev/null differ