* [PATCH] btrfs-progs: fix unterminated long opts for send
@ 2020-12-25 19:15 Adam Borowski
2021-01-05 15:46 ` David Sterba
0 siblings, 1 reply; 2+ messages in thread
From: Adam Borowski @ 2020-12-25 19:15 UTC (permalink / raw)
To: David Sterba, linux-btrfs; +Cc: Adam Borowski
Any use of a long option would crash.
Signed-off-by: Adam Borowski <kilobyte@angband.pl>
---
cmds/send.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/cmds/send.c b/cmds/send.c
index b8e3ba12..3bfc69f5 100644
--- a/cmds/send.c
+++ b/cmds/send.c
@@ -496,7 +496,8 @@ static int cmd_send(const struct cmd_struct *cmd, int argc, char **argv)
static const struct option long_options[] = {
{ "verbose", no_argument, NULL, 'v' },
{ "quiet", no_argument, NULL, 'q' },
- { "no-data", no_argument, NULL, GETOPT_VAL_SEND_NO_DATA }
+ { "no-data", no_argument, NULL, GETOPT_VAL_SEND_NO_DATA },
+ { NULL, 0, NULL, 0 }
};
int c = getopt_long(argc, argv, "vqec:f:i:p:", long_options, NULL);
--
2.30.0.rc2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] btrfs-progs: fix unterminated long opts for send
2020-12-25 19:15 [PATCH] btrfs-progs: fix unterminated long opts for send Adam Borowski
@ 2021-01-05 15:46 ` David Sterba
0 siblings, 0 replies; 2+ messages in thread
From: David Sterba @ 2021-01-05 15:46 UTC (permalink / raw)
To: Adam Borowski; +Cc: David Sterba, linux-btrfs
On Fri, Dec 25, 2020 at 08:15:30PM +0100, Adam Borowski wrote:
> Any use of a long option would crash.
>
> Signed-off-by: Adam Borowski <kilobyte@angband.pl>
Omar sent this fix within another series, I've added it to devel some
time ago.
https://lore.kernel.org/linux-btrfs/e0aff7fddf35f0f18ff21d1e2e50a5d127254392.1605723745.git.osandov@osandov.com/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-05 15:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-25 19:15 [PATCH] btrfs-progs: fix unterminated long opts for send Adam Borowski
2021-01-05 15:46 ` David Sterba
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.