diff mbox series

package/exfatprogs: fix TestExfatProgs

Message ID 20241102191711.677252-1-romain.naour@smile.fr
State Accepted
Headers show
Series package/exfatprogs: fix TestExfatProgs | expand

Commit Message

Romain Naour Nov. 2, 2024, 7:17 p.m. UTC
There is a regression in exfatlabel since exfatprogs 1.2.5.

exfatlabel tool error out when we try to set a new volume serial or
label.

  exfatlabel /dev/sda1 "new label"
  exfatlabel -i /dev/sda1 0x12345678

Error out only if too few argument is given, ignore additional
arguments.

Fixes:
https://gitlab.com/buildroot.org/buildroot/-/jobs/8199992419

Signed-off-by: Romain Naour <romain.naour@smile.fr>
---
 ...rogs-fix-argument-validation-check-2.patch | 41 +++++++++++++++++++
 1 file changed, 41 insertions(+)
 create mode 100644 package/exfatprogs/0001-exfatprogs-fix-argument-validation-check-2.patch

Comments

Julien Olivain Nov. 3, 2024, 4:29 p.m. UTC | #1
On 02/11/2024 20:17, Romain Naour via buildroot wrote:
> There is a regression in exfatlabel since exfatprogs 1.2.5.
> 
> exfatlabel tool error out when we try to set a new volume serial or
> label.
> 
>   exfatlabel /dev/sda1 "new label"
>   exfatlabel -i /dev/sda1 0x12345678
> 
> Error out only if too few argument is given, ignore additional
> arguments.
> 
> Fixes:
> https://gitlab.com/buildroot.org/buildroot/-/jobs/8199992419
> 
> Signed-off-by: Romain Naour <romain.naour@smile.fr>

Applied to master. Thanks!

> ---
>  ...rogs-fix-argument-validation-check-2.patch | 41 +++++++++++++++++++
>  1 file changed, 41 insertions(+)
>  create mode 100644 
> package/exfatprogs/0001-exfatprogs-fix-argument-validation-check-2.patch
> 
> diff --git 
> a/package/exfatprogs/0001-exfatprogs-fix-argument-validation-check-2.patch 
> b/package/exfatprogs/0001-exfatprogs-fix-argument-validation-check-2.patch
> new file mode 100644
> index 0000000000..28c9a71466
> --- /dev/null
> +++ 
> b/package/exfatprogs/0001-exfatprogs-fix-argument-validation-check-2.patch
> @@ -0,0 +1,41 @@
> +From 5055bc4e852e18ddbfc618623cdaa2c0572d5f0e Mon Sep 17 00:00:00 2001
> +From: Romain Naour <romain.naour@smile.fr>
> +Date: Sat, 2 Nov 2024 19:27:46 +0100
> +Subject: [PATCH] exfatprogs: fix argument validation check (2)
> +
> +Since commit 7d354e5be83ed3bb981c59b3435ff64da56d185d
> +("exfatprogs: fix argument validation check"), exfatlabel tool
> +error out when we try to set a new volume serial or label.
> +
> +  exfatlabel /dev/sda1 "new label"
> +  exfatlabel -i /dev/sda1 0x12345678
> +
> +Error out only if too few argument is given, ignore
> +additional arguments.
> +
> +Fixes:
> +https://gitlab.com/buildroot.org/buildroot/-/jobs/8199992419
> +
> +Upstream: https://github.com/exfatprogs/exfatprogs/pull/279
> +
> +Signed-off-by: Romain Naour <romain.naour@smile.fr>
> +---
> + label/label.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/label/label.c b/label/label.c
> +index 12d027b..9c8aff3 100644
> +--- a/label/label.c
> ++++ b/label/label.c
> +@@ -78,7 +78,7 @@ int main(int argc, char *argv[])
> + 	if (version_only)
> + 		exit(EXIT_FAILURE);
> +
> +-	if (argc - optind != 1)
> ++	if (argc - optind < 1)
> + 		usage();
> +
> + 	ui.dev_name = argv[serial_mode + 1];
> +--
> +2.45.0
> +
> --
> 2.45.0
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
diff mbox series

Patch

diff --git a/package/exfatprogs/0001-exfatprogs-fix-argument-validation-check-2.patch b/package/exfatprogs/0001-exfatprogs-fix-argument-validation-check-2.patch
new file mode 100644
index 0000000000..28c9a71466
--- /dev/null
+++ b/package/exfatprogs/0001-exfatprogs-fix-argument-validation-check-2.patch
@@ -0,0 +1,41 @@ 
+From 5055bc4e852e18ddbfc618623cdaa2c0572d5f0e Mon Sep 17 00:00:00 2001
+From: Romain Naour <romain.naour@smile.fr>
+Date: Sat, 2 Nov 2024 19:27:46 +0100
+Subject: [PATCH] exfatprogs: fix argument validation check (2)
+
+Since commit 7d354e5be83ed3bb981c59b3435ff64da56d185d
+("exfatprogs: fix argument validation check"), exfatlabel tool
+error out when we try to set a new volume serial or label.
+
+  exfatlabel /dev/sda1 "new label"
+  exfatlabel -i /dev/sda1 0x12345678
+
+Error out only if too few argument is given, ignore
+additional arguments.
+
+Fixes:
+https://gitlab.com/buildroot.org/buildroot/-/jobs/8199992419
+
+Upstream: https://github.com/exfatprogs/exfatprogs/pull/279
+
+Signed-off-by: Romain Naour <romain.naour@smile.fr>
+---
+ label/label.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/label/label.c b/label/label.c
+index 12d027b..9c8aff3 100644
+--- a/label/label.c
++++ b/label/label.c
+@@ -78,7 +78,7 @@ int main(int argc, char *argv[])
+ 	if (version_only)
+ 		exit(EXIT_FAILURE);
+ 
+-	if (argc - optind != 1)
++	if (argc - optind < 1)
+ 		usage();
+ 
+ 	ui.dev_name = argv[serial_mode + 1];
+-- 
+2.45.0
+