Detected by Coverity
---
src/libvirtMib_subagent.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/libvirtMib_subagent.c b/src/libvirtMib_subagent.c
index f5749be..ee99fb9 100644
--- a/src/libvirtMib_subagent.c
+++ b/src/libvirtMib_subagent.c
@@ -60,7 +60,7 @@ main (int argc, char **argv) {
/* Defs for arg-handling code: handles setting of policy-related variables */
int ch;
extern char *optarg;
- int dont_fork = 0, use_syslog = 0;
+ int dont_fork = 0, use_syslog = 1;
char *agentx_socket = NULL;
while ((ch = getopt(argc, argv, "D:fHLMx:")) != EOF)
--
1.7.3.4
Show replies by date
Detected by Coverity
---
src/libvirtGuestTable_data_get.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/src/libvirtGuestTable_data_get.c b/src/libvirtGuestTable_data_get.c
index 2430f9c..cc31e9e 100644
--- a/src/libvirtGuestTable_data_get.c
+++ b/src/libvirtGuestTable_data_get.c
@@ -201,7 +201,7 @@ libvirtGuestName_get( libvirtGuestTable_rowreq_ctx *rowreq_ctx, char
**libvirtGu
if (!rowreq_ctx->data.libvirtGuestName)
return MFD_SKIP;
- len = strlen(rowreq_ctx->data.libvirtGuestName);
+ len = strlen(rowreq_ctx->data.libvirtGuestName) + 1;
if ((NULL == (* libvirtGuestName_val_ptr_ptr )) ||
((* libvirtGuestName_val_ptr_len_ptr ) < len)) {
/*
--
1.7.3.4
Detected by Coverity
---
src/libvirtGuestTable_data_get.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/libvirtGuestTable_data_get.c b/src/libvirtGuestTable_data_get.c
index cc31e9e..81d8bbf 100644
--- a/src/libvirtGuestTable_data_get.c
+++ b/src/libvirtGuestTable_data_get.c
@@ -83,9 +83,8 @@ libvirtGuestTable_indexes_set_tbl_idx(libvirtGuestTable_mib_index
*tbl_idx, char
/*
* make sure there is enough space for libvirtGuestUUID data
*/
- if ((NULL == tbl_idx->libvirtGuestUUID) ||
- (tbl_idx->libvirtGuestUUID_len <
- (libvirtGuestUUID_val_ptr_len))) {
+ if (tbl_idx->libvirtGuestUUID_len <
+ (libvirtGuestUUID_val_ptr_len)) {
snmp_log(LOG_ERR,"not enough space for value\n");
return MFD_ERROR;
}
--
1.7.3.4