From: Forest <forestix@nom.one>
To: The development of GNU GRUB <grub-devel@gnu.org>
Cc: Glenn Washburn <development@efficientek.com>
Subject: Re: [PATCH v2] cryptodisk: allow the user to retry failed passphrases
Date: Sat, 27 Apr 2024 17:10:00 -0700 [thread overview]
Message-ID: <v64r2j53177u0r8ka9ooqolgsg8l5a6esp@sonic.net> (raw)
In-Reply-To: <20240427041556.23bcb35b@crass-HP-ZBook-15-G2>
On Sat, 27 Apr 2024 04:18:29 -0500, Glenn Washburn wrote:
>Its also a good idea to always CC Daniel on patches. They may more easily
>get dropped otherwise.
Thanks. Will do.
>This does not account for tries_env not being a numeric value with no
>garbage at the end or the empty string. I think the above line should be
>replaced with:
>
>if (tries_env != NULL && tries_env[0] != '\0')
> {
> const char *p = NULL;
> tries = grub_strtoul (tries_env, &p, 0);
>
> if (*p != '\0')
> {
> grub_error (grub_errno,
> N_("non-numeric or invalid value for cryptodisk_passphrase_tries: `%s'"),
> tries_env);
> goto error;
> }
> }
This doesn't account for grub_strtoul() ignoring trailing text, so it
generates an error with a potentially stale/misleading grub_errno value.
My next rev will include your suggestion with a fix for that case.
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
https://lists.gnu.org/mailman/listinfo/grub-devel
prev parent reply other threads:[~2024-04-28 0:11 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-07 21:52 [PATCH v2] cryptodisk: allow the user to retry failed passphrases Forest
2024-04-22 17:45 ` Forest
2024-04-22 18:34 ` Patrick Plenefisch
2024-04-27 8:33 ` Glenn Washburn
2024-04-27 9:18 ` Glenn Washburn
2024-04-28 0:10 ` Forest [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=v64r2j53177u0r8ka9ooqolgsg8l5a6esp@sonic.net \
--to=forestix@nom.one \
--cc=development@efficientek.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).