Skip to content

Commit

Permalink
[xmlrpc-c] Coverity 1024199, 1024200, 1024201, 1024202, 1024203, 1024…
Browse files Browse the repository at this point in the history
…204, 1024196, 1024197, 1024198 fixes. Uninitialized pointer read.
  • Loading branch information
andywolk committed Jan 30, 2025
1 parent 75566bc commit 30cca12
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions libs/xmlrpc-c/src/system_method.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ system_listMethods(xmlrpc_env * const envP,

xmlrpc_registry * const registryP = serverInfo;

xmlrpc_value * retvalP;
xmlrpc_value * retvalP = NULL;

XMLRPC_ASSERT_ENV_OK(envP);
XMLRPC_ASSERT_VALUE_OK(paramArrayP);
Expand Down Expand Up @@ -378,7 +378,7 @@ system_methodHelp(xmlrpc_env * const envP,

xmlrpc_registry * const registryP = serverInfo;

xmlrpc_value * retvalP;
xmlrpc_value * retvalP = NULL;

const char * methodName;

Expand Down Expand Up @@ -546,7 +546,7 @@ system_methodSignature(xmlrpc_env * const envP,

xmlrpc_registry * const registryP = (xmlrpc_registry *) serverInfo;

xmlrpc_value * retvalP;
xmlrpc_value * retvalP = NULL;
const char * methodName;
xmlrpc_env env;

Expand Down Expand Up @@ -615,7 +615,7 @@ system_shutdown(xmlrpc_env * const envP,

xmlrpc_registry * const registryP = (xmlrpc_registry *) serverInfo;

xmlrpc_value * retvalP;
xmlrpc_value * retvalP = NULL;
const char * comment;
xmlrpc_env env;

Expand Down Expand Up @@ -700,7 +700,7 @@ system_capabilities(xmlrpc_env * const envP,

xmlrpc_registry * const registryP = serverInfo;

xmlrpc_value * retvalP;
xmlrpc_value * retvalP = NULL;

unsigned int paramCount;

Expand Down Expand Up @@ -766,7 +766,7 @@ system_getCapabilities(xmlrpc_env * const envP,

xmlrpc_registry * const registryP = serverInfo;

xmlrpc_value * retvalP;
xmlrpc_value * retvalP = NULL;

unsigned int paramCount;

Expand Down
6 changes: 3 additions & 3 deletions libs/xmlrpc-c/src/xmlrpc_datetime.c
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ xmlrpc_value *
xmlrpc_datetime_new(xmlrpc_env * const envP,
xmlrpc_datetime const dt) {

xmlrpc_value * valP;
xmlrpc_value * valP = NULL;

const char ** readBufferP;

Expand Down Expand Up @@ -502,7 +502,7 @@ xmlrpc_datetime_new_str(xmlrpc_env * const envP,
Do not extend this. The user should use more normal C representations
of datetimes.
-----------------------------------------------------------------------------*/
xmlrpc_value * retval;
xmlrpc_value * retval = NULL;

validateFormat(envP, datetimeString);
if (!envP->fault_occurred) {
Expand Down Expand Up @@ -533,7 +533,7 @@ xmlrpc_datetime_new_usec(xmlrpc_env * const envP,
time_t const secs,
unsigned int const usecs) {

xmlrpc_value * valueP;
xmlrpc_value * valueP = NULL;

if (usecs >= 1000000)
xmlrpc_faultf(envP, "Number of fractional microseconds must be less "
Expand Down

0 comments on commit 30cca12

Please sign in to comment.