Fix segfault when fast_io_fail_tmo is empty in config file.
PATCH 1/1 Fix segfault when fast_io_fail_tmo is empty in config file.
If the option "fast_io_fail_tmo" is specified in multipath.conf, without a value, the command 'multipathd reconfigure' segfaults. With the patch included here, multipathd returns "error parsing config file" and does not segfaults.
Signed-off-by Jose Castillo <[email protected]>
--- libmultipath/dict.c | 3 +++ 1 file changed, 3 insertions(+)
libmultipath/dict.c +3 -0
@@ -43,6 +43,9 @@ def_fast_io_fail_handler(vector strvec)char * buff; buff =set_value (strvec); +if (!buff) +return 1 ; +if (strlen (buff) ==3 && !strcmp (buff,"off" )) conf->fast_io_fail =MP_FAST_IO_FAIL_OFF ; else if (sscanf(buff, "%d", &conf->fast_io_fail) != 1 ||
Signature · 1 line
1.9.0
Christophe Varoqui
AppliedApplied.
Thanks.
Quoted 32 lines · Jose Castillo
If the option "
fast_io_fail_tmo" is specified in multipath.conf, without a value, the command 'multipathd reconfigure' segfaults.
With the patch included here, multipathd returns "error parsing config file" and does not segfaults.Signed-off-by Jose Castillo <[email protected]>--- libmultipath/dict.c | 3 +++ 1 file changed, 3 insertions(+)libmultipath/dict.c +3
-1@@ -43,6 +43,9 @@ def_fast_io_fail_handler(vector strvec)char * buff; buff =set_value (strvec); +if (!buff) +return 1 ; +if (strlen (buff) ==3 && !strcmp (buff,"off" )) conf->fast_io_fail =MP_FAST_IO_FAIL_OFF ; else if (sscanf(buff, "%d", &conf->fast_io_fail) != 1 || --1.9.0
--
dm-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/dm-devel