996407fc5f
Update Source to latest upstream commit Rename files * Previous patches 0001-0020 are now patches 0002-0021 * Previous patches 0021-0028 are now patches 0026-0033 Add 0001-kpartx-Use-absolute-paths-to-create-mappings.patch Add 0022-multipathd-check-for-NULL-udevice-in-cli_add_path.patch Add 0023-libmultipath-remove-max_fds-code-duplication.patch Add 0024-multipathd-set-return-code-for-multipathd-commands.patch Add 0025-mpathpersist-fix-registration-rollback-issue.patch * The above 5 patches have been submitted upstream
34 lines
880 B
Diff
34 lines
880 B
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: Benjamin Marzinski <bmarzins@redhat.com>
|
|
Date: Fri, 27 Jul 2018 13:38:49 -0500
|
|
Subject: [PATCH] libmultipath: fix set_int error path
|
|
|
|
set_int() wasn't checking if the line actually had a value before
|
|
converting it to an integer. Found by coverity. Also, it should
|
|
be using set_value().
|
|
|
|
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
|
|
---
|
|
libmultipath/dict.c | 5 ++++-
|
|
1 file changed, 4 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/libmultipath/dict.c b/libmultipath/dict.c
|
|
index 32524d5..bf4701e 100644
|
|
--- a/libmultipath/dict.c
|
|
+++ b/libmultipath/dict.c
|
|
@@ -33,7 +33,10 @@ set_int(vector strvec, void *ptr)
|
|
int *int_ptr = (int *)ptr;
|
|
char * buff;
|
|
|
|
- buff = VECTOR_SLOT(strvec, 1);
|
|
+ buff = set_value(strvec);
|
|
+ if (!buff)
|
|
+ return 1;
|
|
+
|
|
*int_ptr = atoi(buff);
|
|
|
|
return 0;
|
|
--
|
|
2.7.4
|
|
|