mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] [PATCH 1/2] sbsiglist: add information about short options.
@ 2020-11-07  6:51 Érico Nogueira
  2020-11-07  6:51 ` [musl] [PATCH 2/2] sbsiglist: fix typo when checking cli args Érico Nogueira
  0 siblings, 1 reply; 3+ messages in thread
From: Érico Nogueira @ 2020-11-07  6:51 UTC (permalink / raw)
  To: musl; +Cc: Érico Rolim

From: Érico Rolim <erico.erc@gmail.com>

---
 src/sbsiglist.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/src/sbsiglist.c b/src/sbsiglist.c
index 2af577f..7d396fa 100644
--- a/src/sbsiglist.c
+++ b/src/sbsiglist.c
@@ -102,15 +102,17 @@ void usage(void)
 	printf("Usage: %s [options] --owner <guid> --type <type> <sig-file>\n"
 		"Create an EFI_SIGNATURE_LIST from a signature file\n"
 		"Options:\n"
-		"\t--owner <guid>   Signature owner GUID\n"
-		"\t--type <type>    Signature type. One of:\n",
+		"\t-w, --owner <guid>   Signature owner GUID\n"
+		"\t-t, --type <type>    Signature type. One of:\n",
 		toolname);
 
 	for (i = 0; i < ARRAY_SIZE(cert_types); i++)
 		printf("\t                     %s\n", cert_types[i].name);
 
-	printf("\t--output <file>  write signed data to <file>\n"
+	printf("\t-o, --output <file>  write signed data to <file>\n"
 		"\t                  (default <sig-file>.siglist)\n");
+	printf("\t-v, --verbose     Show verbose output\n");
+	printf("\t-V, --version     Show version information\n");
 }
 
 static void version(void)
-- 
2.29.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [musl] [PATCH 2/2] sbsiglist: fix typo when checking cli args.
  2020-11-07  6:51 [musl] [PATCH 1/2] sbsiglist: add information about short options Érico Nogueira
@ 2020-11-07  6:51 ` Érico Nogueira
  2020-11-07 20:51   ` Érico Nogueira
  0 siblings, 1 reply; 3+ messages in thread
From: Érico Nogueira @ 2020-11-07  6:51 UTC (permalink / raw)
  To: musl; +Cc: Érico Rolim

From: Érico Rolim <erico.erc@gmail.com>

type_str was being checked twice, and owner_guid_str wasn't checked at
all. This lead to a possible segfault when only --owner was missing from
the command line arguments.
---
 src/sbsiglist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/sbsiglist.c b/src/sbsiglist.c
index 7d396fa..aada63a 100644
--- a/src/sbsiglist.c
+++ b/src/sbsiglist.c
@@ -241,7 +241,7 @@ int main(int argc, char **argv)
 		return EXIT_FAILURE;
 	}
 
-	if (!type_str) {
+	if (!owner_guid_str) {
 		fprintf(stderr, "No owner specified\n");
 		usage();
 		return EXIT_FAILURE;
-- 
2.29.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [musl] [PATCH 2/2] sbsiglist: fix typo when checking cli args.
  2020-11-07  6:51 ` [musl] [PATCH 2/2] sbsiglist: fix typo when checking cli args Érico Nogueira
@ 2020-11-07 20:51   ` Érico Nogueira
  0 siblings, 0 replies; 3+ messages in thread
From: Érico Nogueira @ 2020-11-07 20:51 UTC (permalink / raw)
  To: musl, musl

Sorry for the noise, I didn't pay attention while git-send-email'ing and
this ended up on the wrong ML.

On Sat Nov 7, 2020 at 12:51 AM -03, Érico Nogueira wrote:
> From: Érico Rolim <erico.erc@gmail.com>
>
> type_str was being checked twice, and owner_guid_str wasn't checked at
> all. This lead to a possible segfault when only --owner was missing from
> the command line arguments.
> ---
> src/sbsiglist.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/sbsiglist.c b/src/sbsiglist.c
> index 7d396fa..aada63a 100644
> --- a/src/sbsiglist.c
> +++ b/src/sbsiglist.c
> @@ -241,7 +241,7 @@ int main(int argc, char **argv)
> return EXIT_FAILURE;
> }
>  
> - if (!type_str) {
> + if (!owner_guid_str) {
> fprintf(stderr, "No owner specified\n");
> usage();
> return EXIT_FAILURE;
> --
> 2.29.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-11-07 20:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-07  6:51 [musl] [PATCH 1/2] sbsiglist: add information about short options Érico Nogueira
2020-11-07  6:51 ` [musl] [PATCH 2/2] sbsiglist: fix typo when checking cli args Érico Nogueira
2020-11-07 20:51   ` Érico Nogueira

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).