btrfs-progs: fix unterminated long opts for send
PATCH 1/1 btrfs-progs: fix unterminated long opts for send
Any use of a long option would crash.
Signed-off-by Adam Borowski <[email protected]>
--- cmds/send.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
cmds/send.c +2 -1
@@ -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 );
Signature · 1 line
2.30.0.rc2
Quoted 3 lines · Adam Borowski
Any use of a long option would crash.
Signed-off-by Adam Borowski <[email protected]>
Omar sent this fix within another series, I've added it to devel some time ago.