From 546047688e1c64638f462147c755b58119cabdc8 Mon Sep 17 00:00:00 2001 From: Wu Guanghao Date: Mon, 16 Aug 2021 15:24:51 +0800 Subject: [PATCH] mdadm: fix coredump of mdadm --monitor -r The --monitor -r option requires a parameter, otherwise a null pointer will be manipulated when converting to integer data, and a coredump will appear. Segmentation fault (core dumped) Signed-off-by: Wu Guanghao Acked-by: Mariusz Tkaczyk Signed-off-by: Jes Sorensen --- ReadMe.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ReadMe.c b/ReadMe.c index 978796a..37d8462 100644 --- a/ReadMe.c +++ b/ReadMe.c @@ -81,11 +81,11 @@ char Version[] = "mdadm - v" VERSION " - " VERS_DATE EXTRAVERSION "\n"; * found, it is started. */ -char short_options[]="-ABCDEFGIQhVXYWZ:vqbc:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:k:"; +char short_options[]="-ABCDEFGIQhVXYWZ:vqbc:i:l:p:m:r:n:x:u:c:d:z:U:N:safRSow1tye:k"; char short_bitmap_options[]= - "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sarfRSow1tye:k:"; + "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:r:n:x:u:c:d:z:U:N:sarfRSow1tye:k:"; char short_bitmap_auto_options[]= - "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:n:x:u:c:d:z:U:N:sa:rfRSow1tye:k:"; + "-ABCDEFGIQhVXYWZ:vqb:c:i:l:p:m:r:n:x:u:c:d:z:U:N:sa:rfRSow1tye:k:"; struct option long_options[] = { {"manage", 0, 0, ManageOpt},