Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[xmlrpc-c] Coverity 1024199, 1024200, 1024201, 1024202, 1024203, 1024204, 1024196, 1024197, 1024198 fixes. Uninitialized pointer read. #2753

Merged
merged 1 commit into from
Jan 30, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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