|
|
b2d430 |
From 87f7c2f1f44085963b41eb78e337840ddbc7be76 Mon Sep 17 00:00:00 2001
|
|
|
b2d430 |
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= <pbrezina@redhat.com>
|
|
|
b2d430 |
Date: Thu, 14 Jul 2016 10:49:37 +0200
|
|
|
b2d430 |
Subject: [PATCH 097/102] sifp: fix coverity warning
|
|
|
b2d430 |
MIME-Version: 1.0
|
|
|
b2d430 |
Content-Type: text/plain; charset=UTF-8
|
|
|
b2d430 |
Content-Transfer-Encoding: 8bit
|
|
|
b2d430 |
|
|
|
b2d430 |
sssd-1.14.1/src/lib/sifp/sss_sifp_dbus.c:51: check_return:
|
|
|
b2d430 |
Calling "dbus_message_append_args_valist" without checking return value
|
|
|
b2d430 |
(as is done elsewhere 4 out of 5 times).
|
|
|
b2d430 |
|
|
|
b2d430 |
Reviewed-by: Lukáš Slebodník <lslebodn@redhat.com>
|
|
|
b2d430 |
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
|
|
|
b2d430 |
(cherry picked from commit de5160e354c02020f0593c7cabdb811107d5d8e2)
|
|
|
b2d430 |
---
|
|
|
b2d430 |
src/lib/sifp/sss_sifp_dbus.c | 7 ++++++-
|
|
|
b2d430 |
1 file changed, 6 insertions(+), 1 deletion(-)
|
|
|
b2d430 |
|
|
|
b2d430 |
diff --git a/src/lib/sifp/sss_sifp_dbus.c b/src/lib/sifp/sss_sifp_dbus.c
|
|
|
b2d430 |
index 7c72c52f0d226ccdfaf7b8ffaed7776647a7771c..2906c5ac383c412231127f6ffa8081d47eb2bced 100644
|
|
|
b2d430 |
--- a/src/lib/sifp/sss_sifp_dbus.c
|
|
|
b2d430 |
+++ b/src/lib/sifp/sss_sifp_dbus.c
|
|
|
b2d430 |
@@ -36,6 +36,7 @@ static sss_sifp_error sss_sifp_ifp_call(sss_sifp_ctx *ctx,
|
|
|
b2d430 |
{
|
|
|
b2d430 |
DBusMessage *msg = NULL;
|
|
|
b2d430 |
sss_sifp_error ret;
|
|
|
b2d430 |
+ dbus_bool_t bret;
|
|
|
b2d430 |
|
|
|
b2d430 |
if (object_path == NULL || interface == NULL || method == NULL) {
|
|
|
b2d430 |
return SSS_SIFP_INVALID_ARGUMENT;
|
|
|
b2d430 |
@@ -48,7 +49,11 @@ static sss_sifp_error sss_sifp_ifp_call(sss_sifp_ctx *ctx,
|
|
|
b2d430 |
}
|
|
|
b2d430 |
|
|
|
b2d430 |
if (first_arg_type != DBUS_TYPE_INVALID) {
|
|
|
b2d430 |
- dbus_message_append_args_valist(msg, first_arg_type, ap);
|
|
|
b2d430 |
+ bret = dbus_message_append_args_valist(msg, first_arg_type, ap);
|
|
|
b2d430 |
+ if (!bret) {
|
|
|
b2d430 |
+ ret = SSS_SIFP_IO_ERROR;
|
|
|
b2d430 |
+ goto done;
|
|
|
b2d430 |
+ }
|
|
|
b2d430 |
}
|
|
|
b2d430 |
|
|
|
b2d430 |
ret = sss_sifp_send_message(ctx, msg, _reply);
|
|
|
b2d430 |
--
|
|
|
b2d430 |
2.4.11
|
|
|
b2d430 |
|