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

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