Blame SOURCES/0091-RHBZ-1069584-fix-empty-values-fast-io-fail-and-dev-loss.patch

38852f
---
38852f
 libmultipath/dict.c |    9 +++++++++
38852f
 1 file changed, 9 insertions(+)
38852f
38852f
Index: multipath-tools-130222/libmultipath/dict.c
38852f
===================================================================
38852f
--- multipath-tools-130222.orig/libmultipath/dict.c
38852f
+++ multipath-tools-130222/libmultipath/dict.c
38852f
@@ -43,6 +43,9 @@ def_fast_io_fail_handler(vector strvec)
38852f
 	char * buff;
38852f
 
38852f
 	buff = set_value(strvec);
38852f
+	if (!buff)
38852f
+		return 1;
38852f
+
38852f
 	if (strlen(buff) == 3 && !strcmp(buff, "off"))
38852f
 		conf->fast_io_fail = MP_FAST_IO_FAIL_OFF;
38852f
 	else if (sscanf(buff, "%d", &conf->fast_io_fail) != 1 ||
38852f
@@ -1002,6 +1005,9 @@ hw_dev_loss_handler(vector strvec)
38852f
 	char * buff;
38852f
 	struct hwentry * hwe = VECTOR_LAST_SLOT(conf->hwtable);
38852f
 
38852f
+        if (!hwe)
38852f
+                return 1;
38852f
+
38852f
 	buff = set_value(strvec);
38852f
 	if (!buff)
38852f
 		return 1;
38852f
@@ -1021,6 +1027,9 @@ hw_pgpolicy_handler(vector strvec)
38852f
 	char * buff;
38852f
 	struct hwentry * hwe = VECTOR_LAST_SLOT(conf->hwtable);
38852f
 
38852f
+        if (!hwe)
38852f
+                return 1;
38852f
+
38852f
 	buff = set_value(strvec);
38852f
 
38852f
 	if (!buff)