summaryrefslogtreecommitdiffstats
path: root/ReadMe.c
diff options
context:
space:
mode:
authorWu Guanghao <wuguanghao3@huawei.com>2021-08-16 09:24:51 +0200
committerJes Sorensen <jsorensen@fb.com>2021-10-08 12:01:40 +0200
commit546047688e1c64638f462147c755b58119cabdc8 (patch)
tree37fbe27c8a3355d330a271da319820aab31ad5c9 /ReadMe.c
parentUtils: Change sprintf to snprintf (diff)
downloadmdadm-546047688e1c64638f462147c755b58119cabdc8.tar.xz
mdadm-546047688e1c64638f462147c755b58119cabdc8.zip
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 <wuguanghao3@huawei.com> Acked-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com> Signed-off-by: Jes Sorensen <jsorensen@fb.com>
Diffstat (limited to 'ReadMe.c')
-rw-r--r--ReadMe.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ReadMe.c b/ReadMe.c
index 978796ac..37d84625 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},