idx
int64
func_before
string
Vulnerability Classification
string
vul
int64
func_after
string
patch
string
CWE ID
string
lines_before
string
lines_after
string
13,000
GahpClient::gt4_gram_client_job_create( const char * submit_id, const char * resource_manager_contact, const char * jobmanager_type, const char * callback_contact, const char * rsl, time_t termination_time, char ** job_contact) { static const char* command = "GT4_GRAM_JOB_SUBMIT"; if (server->m_c...
DoS Exec Code
0
GahpClient::gt4_gram_client_job_create( const char * submit_id, const char * resource_manager_contact, const char * jobmanager_type, const char * callback_contact, const char * rsl, time_t termination_time, char ** job_contact) { static const char* command = "GT4_GRAM_JOB_SUBMIT"; if (server->m_c...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,001
GahpClient::gt4_gram_client_job_destroy(const char * job_contact) { static const char* command = "GT4_GRAM_JOB_DESTROY"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!job_contact) job_contact=NULLSTRING; std::string reqline; int x = spri...
DoS Exec Code
0
GahpClient::gt4_gram_client_job_destroy(const char * job_contact) { static const char* command = "GT4_GRAM_JOB_DESTROY"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!job_contact) job_contact=NULLSTRING; std::string reqline; int x = spri...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,002
GahpClient::gt4_gram_client_job_start(const char * job_contact) { static const char* command = "GT4_GRAM_JOB_START"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!job_contact) job_contact=NULLSTRING; std::string reqline; int x = sprintf(...
DoS Exec Code
0
GahpClient::gt4_gram_client_job_start(const char * job_contact) { static const char* command = "GT4_GRAM_JOB_START"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!job_contact) job_contact=NULLSTRING; std::string reqline; int x = sprintf(...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,003
GahpClient::gt4_gram_client_job_status(const char * job_contact, char ** job_status, char ** job_fault, int * exit_code) { static const char* command = "GT4_GRAM_JOB_STATUS"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!job_contact) job_...
DoS Exec Code
0
GahpClient::gt4_gram_client_job_status(const char * job_contact, char ** job_status, char ** job_fault, int * exit_code) { static const char* command = "GT4_GRAM_JOB_STATUS"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!job_contact) job_...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,004
GahpClient::gt4_gram_client_ping(const char * resource_contact) { static const char* command = "GT4_GRAM_PING"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!resource_contact) resource_contact=NULLSTRING; std::string reqline; int x = spr...
DoS Exec Code
0
GahpClient::gt4_gram_client_ping(const char * resource_contact) { static const char* command = "GT4_GRAM_PING"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!resource_contact) resource_contact=NULLSTRING; std::string reqline; int x = spr...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,005
GahpClient::gt4_set_termination_time(const char *resource_uri, time_t &new_termination_time) { static const char* command = "GT4_SET_TERMINATION_TIME"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!resource_uri) resource_uri=NULL...
DoS Exec Code
0
GahpClient::gt4_set_termination_time(const char *resource_uri, time_t &new_termination_time) { static const char* command = "GT4_SET_TERMINATION_TIME"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!resource_uri) resource_uri=NULL...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,006
GahpClient::is_pending(const char *command, const char * /* buf */) { if ( command && pending_command && strcmp(command,pending_command)==0 ) { return true; } return false; }
DoS Exec Code
0
GahpClient::is_pending(const char *command, const char * /* buf */) { if ( command && pending_command && strcmp(command,pending_command)==0 ) { return true; } return false; }
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,007
GahpClient::nordugrid_cancel(const char *hostname, const char *job_id) { static const char* command = "NORDUGRID_CANCEL"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!hostname) hostname=NULLSTRING; if (!job_id) job_id=NULLSTRING; std::s...
DoS Exec Code
0
GahpClient::nordugrid_cancel(const char *hostname, const char *job_id) { static const char* command = "NORDUGRID_CANCEL"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!hostname) hostname=NULLSTRING; if (!job_id) job_id=NULLSTRING; std::s...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,008
GahpClient::nordugrid_exit_info(const char *hostname, const char *job_id, bool &normal_exit, int &exit_code, float &wallclock, float &sys_cpu, float &user_cpu ) { static const char* command = "NORDUGRID_EXIT_INFO"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { retur...
DoS Exec Code
0
GahpClient::nordugrid_exit_info(const char *hostname, const char *job_id, bool &normal_exit, int &exit_code, float &wallclock, float &sys_cpu, float &user_cpu ) { static const char* command = "NORDUGRID_EXIT_INFO"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { retur...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,009
GahpClient::nordugrid_ldap_query(const char *hostname, const char *ldap_base, const char *ldap_filter, const char *ldap_attrs, StringList &results) { static const char* command = "NORDUGRID_LDAP_QUERY"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMA...
DoS Exec Code
0
GahpClient::nordugrid_ldap_query(const char *hostname, const char *ldap_base, const char *ldap_filter, const char *ldap_attrs, StringList &results) { static const char* command = "NORDUGRID_LDAP_QUERY"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMA...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,010
GahpClient::nordugrid_ping(const char *hostname) { static const char* command = "NORDUGRID_PING"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!hostname) hostname=NULLSTRING; std::string reqline; int x = sprintf(reqline,"%s",escapeGahpSt...
DoS Exec Code
0
GahpClient::nordugrid_ping(const char *hostname) { static const char* command = "NORDUGRID_PING"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!hostname) hostname=NULLSTRING; std::string reqline; int x = sprintf(reqline,"%s",escapeGahpSt...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,011
GahpClient::nordugrid_stage_out(const char *hostname, const char *job_id, StringList &files) { static const char* command = "NORDUGRID_STAGE_OUT"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!hostname) hostname=NULLSTRING; if (!j...
DoS Exec Code
0
GahpClient::nordugrid_stage_out(const char *hostname, const char *job_id, StringList &files) { static const char* command = "NORDUGRID_STAGE_OUT"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!hostname) hostname=NULLSTRING; if (!j...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,012
GahpClient::nordugrid_status(const char *hostname, const char *job_id, char *&status) { static const char* command = "NORDUGRID_STATUS"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!hostname) hostname=NULLSTRING; if (!job_id) job...
DoS Exec Code
0
GahpClient::nordugrid_status(const char *hostname, const char *job_id, char *&status) { static const char* command = "NORDUGRID_STATUS"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!hostname) hostname=NULLSTRING; if (!job_id) job...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,013
GahpClient::nordugrid_submit(const char *hostname, const char *rsl, char *&job_id) { static const char* command = "NORDUGRID_SUBMIT"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!hostname) hostname=NULLSTRING; if (!rsl) rsl=NULLS...
DoS Exec Code
0
GahpClient::nordugrid_submit(const char *hostname, const char *rsl, char *&job_id) { static const char* command = "NORDUGRID_SUBMIT"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!hostname) hostname=NULLSTRING; if (!rsl) rsl=NULLS...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,014
GahpServer::pipe_ready(int /*pipe_end*/ ) { skip_next_r = true; poll_real_soon(); return TRUE; }
DoS Exec Code
0
GahpServer::pipe_ready(int /*pipe_end*/ ) { skip_next_r = true; poll_real_soon(); return TRUE; }
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,015
GahpServer::poll() { Gahp_Args* result = NULL; int num_results = 0; int i, result_reqid; GahpClient* entry; ExtArray<Gahp_Args*> result_lines; m_in_results = true; poll_pending = false; write_line("RESULTS"); result = new Gahp_Args; ASSERT(result); read_argv(result); if ( result->argc < 2 || result->arg...
DoS Exec Code
0
GahpServer::poll() { Gahp_Args* result = NULL; int num_results = 0; int i, result_reqid; GahpClient* entry; ExtArray<Gahp_Args*> result_lines; m_in_results = true; poll_pending = false; write_line("RESULTS"); result = new Gahp_Args; ASSERT(result); read_argv(result); if ( result->argc < 2 || result->arg...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,016
GahpServer::poll_real_soon() { if (!poll_pending) { int tid = daemonCore->Register_Timer(0, (TimerHandlercpp)&GahpServer::poll, "GahpServer::poll from poll_real_soon",this); if ( tid != -1 ) { poll_pending = true; } } }
DoS Exec Code
0
GahpServer::poll_real_soon() { if (!poll_pending) { int tid = daemonCore->Register_Timer(0, (TimerHandlercpp)&GahpServer::poll, "GahpServer::poll from poll_real_soon",this); if ( tid != -1 ) { poll_pending = true; } } }
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,017
GahpServer::read_argv(Gahp_Args &g_args) { static char* buf = NULL; int ibuf = 0; int result = 0; bool trash_this_line = false; bool escape_seen = false; static const int buf_size = 1024 * 500; g_args.reset(); if ( m_gahp_readfd == -1 ) { if ( logGahpIo ) { dprintf( D_FULLDEBUG, "GAHP[%d] -> (no pipe)\n"...
DoS Exec Code
0
GahpServer::read_argv(Gahp_Args &g_args) { static char* buf = NULL; int ibuf = 0; int result = 0; bool trash_this_line = false; bool escape_seen = false; static const int buf_size = 1024 * 500; g_args.reset(); if ( m_gahp_readfd == -1 ) { if ( logGahpIo ) { dprintf( D_FULLDEBUG, "GAHP[%d] -> (no pipe)\n"...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,018
GahpClient::reset_user_timer_alarm() { reset_user_timer(pending_timeout_tid); }
DoS Exec Code
0
GahpClient::reset_user_timer_alarm() { reset_user_timer(pending_timeout_tid); }
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,019
GahpClient::setDelegProxy( Proxy *proxy ) { if ( !server->can_cache_proxies ) { return; } if ( deleg_proxy != NULL && proxy == deleg_proxy->proxy ) { return; } if ( deleg_proxy != NULL ) { server->UnregisterProxy( deleg_proxy->proxy ); } GahpProxyInfo *gahp_proxy = server->RegisterProxy( proxy ); ASSERT(g...
DoS Exec Code
0
GahpClient::setDelegProxy( Proxy *proxy ) { if ( !server->can_cache_proxies ) { return; } if ( deleg_proxy != NULL && proxy == deleg_proxy->proxy ) { return; } if ( deleg_proxy != NULL ) { server->UnregisterProxy( deleg_proxy->proxy ); } GahpProxyInfo *gahp_proxy = server->RegisterProxy( proxy ); ASSERT(g...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,020
GahpClient::setNormalProxy( Proxy *proxy ) { if ( !server->can_cache_proxies ) { return; } if ( normal_proxy != NULL && proxy == normal_proxy->proxy ) { return; } if ( normal_proxy != NULL ) { server->UnregisterProxy( normal_proxy->proxy ); } GahpProxyInfo *gahp_proxy = server->RegisterProxy( proxy ); ASS...
DoS Exec Code
0
GahpClient::setNormalProxy( Proxy *proxy ) { if ( !server->can_cache_proxies ) { return; } if ( normal_proxy != NULL && proxy == normal_proxy->proxy ) { return; } if ( normal_proxy != NULL ) { server->UnregisterProxy( normal_proxy->proxy ); } GahpProxyInfo *gahp_proxy = server->RegisterProxy( proxy ); ASS...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,021
GahpServer::uncacheProxy( GahpProxyInfo *gahp_proxy ) { static const char *command = "UNCACHE_PROXY"; if (m_commands_supported->contains_anycase(command)==FALSE) { return false; } std::string buf; int x = sprintf(buf,"%s %d",command,gahp_proxy->proxy->id); ASSERT( x > 0 ); write_line(buf.c_str()); Gahp_Ar...
DoS Exec Code
0
GahpServer::uncacheProxy( GahpProxyInfo *gahp_proxy ) { static const char *command = "UNCACHE_PROXY"; if (m_commands_supported->contains_anycase(command)==FALSE) { return false; } std::string buf; int x = sprintf(buf,"%s %d",command,gahp_proxy->proxy->id); ASSERT( x > 0 ); write_line(buf.c_str()); Gahp_Ar...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,022
GahpClient::unicore_job_callback(unicore_gahp_callback_func_t callback_func) { char buf[150]; static const char* command = "UNICORE_JOB_CALLBACK"; if ( server->unicore_gahp_callback_func != NULL ) { if ( callback_func != server->unicore_gahp_callback_func ) { EXCEPT("unicore_job_callback called twice"); } ...
DoS Exec Code
0
GahpClient::unicore_job_callback(unicore_gahp_callback_func_t callback_func) { char buf[150]; static const char* command = "UNICORE_JOB_CALLBACK"; if ( server->unicore_gahp_callback_func != NULL ) { if ( callback_func != server->unicore_gahp_callback_func ) { EXCEPT("unicore_job_callback called twice"); } ...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,023
GahpClient::unicore_job_create( const char * description, char ** job_contact) { static const char* command = "UNICORE_JOB_CREATE"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!description) description=NULLSTRING; char *desc = strdup(d...
DoS Exec Code
0
GahpClient::unicore_job_create( const char * description, char ** job_contact) { static const char* command = "UNICORE_JOB_CREATE"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!description) description=NULLSTRING; char *desc = strdup(d...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,024
GahpClient::unicore_job_destroy(const char * job_contact) { static const char* command = "UNICORE_JOB_DESTROY"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!job_contact) job_contact=NULLSTRING; std::string reqline; int x = sprintf(reqli...
DoS Exec Code
0
GahpClient::unicore_job_destroy(const char * job_contact) { static const char* command = "UNICORE_JOB_DESTROY"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!job_contact) job_contact=NULLSTRING; std::string reqline; int x = sprintf(reqli...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,025
GahpClient::unicore_job_recover( const char * description) { static const char* command = "UNICORE_JOB_RECOVER"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!description) description=NULLSTRING; char *desc = strdup(description); int i =...
DoS Exec Code
0
GahpClient::unicore_job_recover( const char * description) { static const char* command = "UNICORE_JOB_RECOVER"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!description) description=NULLSTRING; char *desc = strdup(description); int i =...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,026
GahpClient::unicore_job_start(const char * job_contact) { static const char* command = "UNICORE_JOB_START"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!job_contact) job_contact=NULLSTRING; std::string reqline; int x = sprintf(reqline,"...
DoS Exec Code
0
GahpClient::unicore_job_start(const char * job_contact) { static const char* command = "UNICORE_JOB_START"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!job_contact) job_contact=NULLSTRING; std::string reqline; int x = sprintf(reqline,"...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,027
GahpClient::unicore_job_status(const char * job_contact, char **job_status) { static const char* command = "UNICORE_JOB_STATUS"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!job_contact) job_contact=NULLSTRING; std::string reqline; int...
DoS Exec Code
0
GahpClient::unicore_job_status(const char * job_contact, char **job_status) { static const char* command = "UNICORE_JOB_STATUS"; if (server->m_commands_supported->contains_anycase(command)==FALSE) { return GAHPCLIENT_COMMAND_NOT_SUPPORTED; } if (!job_contact) job_contact=NULLSTRING; std::string reqline; int...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,028
GahpServer::useCachedProxy( GahpProxyInfo *new_proxy, bool force ) { if ( new_proxy == NULL ) { new_proxy = current_proxy; } if ( new_proxy->cached_expiration != new_proxy->proxy->expiration_time ) { if ( command_cache_proxy_from_file( new_proxy ) == false ) { EXCEPT( "Failed to recache proxy!" ); } new_...
DoS Exec Code
0
GahpServer::useCachedProxy( GahpProxyInfo *new_proxy, bool force ) { if ( new_proxy == NULL ) { new_proxy = current_proxy; } if ( new_proxy->cached_expiration != new_proxy->proxy->expiration_time ) { if ( command_cache_proxy_from_file( new_proxy ) == false ) { EXCEPT( "Failed to recache proxy!" ); } new_...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,029
GahpServer::write_line(const char *command, int req, const char *args) { if ( !command || m_gahp_writefd == -1 ) { return; } char buf[20]; sprintf(buf," %d%s",req,args?" ":""); daemonCore->Write_Pipe(m_gahp_writefd,command,strlen(command)); daemonCore->Write_Pipe(m_gahp_writefd,buf,strlen(buf)); if ( args ) {...
DoS Exec Code
0
GahpServer::write_line(const char *command, int req, const char *args) { if ( !command || m_gahp_writefd == -1 ) { return; } char buf[20]; sprintf(buf," %d%s",req,args?" ":""); daemonCore->Write_Pipe(m_gahp_writefd,command,strlen(command)); daemonCore->Write_Pipe(m_gahp_writefd,buf,strlen(buf)); if ( args ) {...
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,030
GahpClient::~GahpClient() { clear_pending(); if ( normal_proxy != NULL ) { server->UnregisterProxy( normal_proxy->proxy ); } if ( deleg_proxy != NULL ) { server->UnregisterProxy( deleg_proxy->proxy ); } server->RemoveGahpClient(); }
DoS Exec Code
0
GahpClient::~GahpClient() { clear_pending(); if ( normal_proxy != NULL ) { server->UnregisterProxy( normal_proxy->proxy ); } if ( deleg_proxy != NULL ) { server->UnregisterProxy( deleg_proxy->proxy ); } server->RemoveGahpClient(); }
@@ -321,10 +321,10 @@ GahpServer::Reaper(Service *,int pid,int status) if ( dead_server ) { sprintf_cat( buf, " unexpectedly" ); - EXCEPT( buf.c_str() ); + EXCEPT( "%s", buf.c_str() ); } else { sprintf_cat( buf, "\n" ); - dprint...
CWE-134
null
null
13,031
Condor_Auth_SSL :: Condor_Auth_SSL(ReliSock * sock, int /* remote */) : Condor_Auth_Base ( sock, CAUTH_SSL ) { m_crypto = NULL; }
DoS Exec Code
0
Condor_Auth_SSL :: Condor_Auth_SSL(ReliSock * sock, int /* remote */) : Condor_Auth_Base ( sock, CAUTH_SSL ) { m_crypto = NULL; }
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,032
int Condor_Auth_SSL :: client_exchange_messages( int client_status, char *buf, BIO *conn_in, BIO *conn_out ) { int server_status = AUTH_SSL_ERROR; ouch("Client exchange messages.\n"); if(( server_status = client_receive_message( client_status, buf, conn_in, conn_out )) == AUTH_SSL_ERROR ...
DoS Exec Code
0
int Condor_Auth_SSL :: client_exchange_messages( int client_status, char *buf, BIO *conn_in, BIO *conn_out ) { int server_status = AUTH_SSL_ERROR; ouch("Client exchange messages.\n"); if(( server_status = client_receive_message( client_status, buf, conn_in, conn_out )) == AUTH_SSL_ERROR ...
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,033
int Condor_Auth_SSL :: client_receive_message( int /* client_status */, char *buf, BIO *conn_in, BIO * /* conn_out */ ) { int server_status; int len = 0; int rv; int written; if( receive_message( server_status, len, buf ) == AUTH_SSL_ERROR ) { return AUTH_SSL_ERROR; } if( len > 0 ) ...
DoS Exec Code
0
int Condor_Auth_SSL :: client_receive_message( int /* client_status */, char *buf, BIO *conn_in, BIO * /* conn_out */ ) { int server_status; int len = 0; int rv; int written; if( receive_message( server_status, len, buf ) == AUTH_SSL_ERROR ) { return AUTH_SSL_ERROR; } if( len > 0 ) ...
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,034
Condor_Auth_SSL::decrypt(unsigned char* input, int input_len, unsigned char* & output, int& output_len) { return encrypt_or_decrypt(false,input,input_len,output,output_len); }
DoS Exec Code
0
Condor_Auth_SSL::decrypt(unsigned char* input, int input_len, unsigned char* & output, int& output_len) { return encrypt_or_decrypt(false,input,input_len,output,output_len); }
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,035
Condor_Auth_SSL::encrypt(unsigned char* input, int input_len, unsigned char* & output, int& output_len) { return encrypt_or_decrypt(true,input,input_len,output,output_len); }
DoS Exec Code
0
Condor_Auth_SSL::encrypt(unsigned char* input, int input_len, unsigned char* & output, int& output_len) { return encrypt_or_decrypt(true,input,input_len,output,output_len); }
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,036
Condor_Auth_SSL::encrypt_or_decrypt(bool want_encrypt, unsigned char* input, int input_len, unsigned char* &output, int &output_len) { bool result; if ( output ) free(output); output = NULL; output_len = 0; if (!input || input_len < 1) { return false; } ...
DoS Exec Code
0
Condor_Auth_SSL::encrypt_or_decrypt(bool want_encrypt, unsigned char* input, int input_len, unsigned char* &output, int &output_len) { bool result; if ( output ) free(output); output = NULL; output_len = 0; if (!input || input_len < 1) { return false; } ...
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,037
int Condor_Auth_SSL :: init_OpenSSL(void) { if (!SSL_library_init()) { return AUTH_SSL_ERROR; } SSL_load_error_strings(); return AUTH_SSL_A_OK; }
DoS Exec Code
0
int Condor_Auth_SSL :: init_OpenSSL(void) { if (!SSL_library_init()) { return AUTH_SSL_ERROR; } SSL_load_error_strings(); return AUTH_SSL_A_OK; }
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,038
int Condor_Auth_SSL::isValid() const { if ( m_crypto ) { return TRUE; } else { return FALSE; } }
DoS Exec Code
0
int Condor_Auth_SSL::isValid() const { if ( m_crypto ) { return TRUE; } else { return FALSE; } }
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,039
long Condor_Auth_SSL :: post_connection_check(SSL *ssl, int /* role */ ) { X509 *cert; /* These are removed, see below. X509_NAME *subj; char data[256]; int extcount; int ok = 0; */ ouch("post_connection_check.\n"); /* Checking the return from SSL_get_peer_certificat...
DoS Exec Code
0
long Condor_Auth_SSL :: post_connection_check(SSL *ssl, int /* role */ ) { X509 *cert; /* These are removed, see below. X509_NAME *subj; char data[256]; int extcount; int ok = 0; */ ouch("post_connection_check.\n"); /* Checking the return from SSL_get_peer_certificat...
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,040
int Condor_Auth_SSL :: receive_message( int &status, int &len, char *buf ) { ouch("Receive message.\n"); mySock_ ->decode( ); if( !(mySock_ ->code( status )) || !(mySock_ ->code( len )) || !(len == (mySock_ ->get_bytes( buf, len ))) || !(mySock_ ->end_of_message( )) ) { ouch(...
DoS Exec Code
0
int Condor_Auth_SSL :: receive_message( int &status, int &len, char *buf ) { ouch("Receive message.\n"); mySock_ ->decode( ); if( !(mySock_ ->code( status )) || !(mySock_ ->code( len )) || !(len == (mySock_ ->get_bytes( buf, len ))) || !(mySock_ ->end_of_message( )) ) { ouch(...
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,041
int Condor_Auth_SSL :: receive_status( int &status ) { mySock_ ->decode( ); if( !(mySock_ ->code( status )) || !(mySock_ ->end_of_message( )) ) { ouch( "Error communicating status\n" ); return AUTH_SSL_ERROR; } return AUTH_SSL_A_OK; }
DoS Exec Code
0
int Condor_Auth_SSL :: receive_status( int &status ) { mySock_ ->decode( ); if( !(mySock_ ->code( status )) || !(mySock_ ->end_of_message( )) ) { ouch( "Error communicating status\n" ); return AUTH_SSL_ERROR; } return AUTH_SSL_A_OK; }
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,042
int Condor_Auth_SSL :: send_status( int status ) { mySock_ ->encode( ); if( !(mySock_ ->code( status )) || !(mySock_ ->end_of_message( )) ) { ouch( "Error communicating status\n" ); return AUTH_SSL_ERROR; } return AUTH_SSL_A_OK; }
DoS Exec Code
0
int Condor_Auth_SSL :: send_status( int status ) { mySock_ ->encode( ); if( !(mySock_ ->code( status )) || !(mySock_ ->end_of_message( )) ) { ouch( "Error communicating status\n" ); return AUTH_SSL_ERROR; } return AUTH_SSL_A_OK; }
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,043
int Condor_Auth_SSL :: server_exchange_messages( int server_status, char *buf, BIO *conn_in, BIO *conn_out ) { ouch("Server exchange messages.\n"); if(server_send_message( server_status, buf, conn_in, conn_out ) == AUTH_SSL_ERROR ) { return AUTH_SSL_ERROR; } return server_receive_message(...
DoS Exec Code
0
int Condor_Auth_SSL :: server_exchange_messages( int server_status, char *buf, BIO *conn_in, BIO *conn_out ) { ouch("Server exchange messages.\n"); if(server_send_message( server_status, buf, conn_in, conn_out ) == AUTH_SSL_ERROR ) { return AUTH_SSL_ERROR; } return server_receive_message(...
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,044
int Condor_Auth_SSL :: server_share_status( int server_status ) { int client_status; if( send_status( server_status ) == AUTH_SSL_ERROR ) { return AUTH_SSL_ERROR; } if( receive_status( client_status ) == AUTH_SSL_ERROR ) { return AUTH_SSL_ERROR; } return client_status; }
DoS Exec Code
0
int Condor_Auth_SSL :: server_share_status( int server_status ) { int client_status; if( send_status( server_status ) == AUTH_SSL_ERROR ) { return AUTH_SSL_ERROR; } if( receive_status( client_status ) == AUTH_SSL_ERROR ) { return AUTH_SSL_ERROR; } return client_status; }
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,045
Condor_Auth_SSL::setup_crypto(unsigned char* key, const int keylen) { if ( m_crypto ) delete m_crypto; m_crypto = NULL; if ( !key || !keylen ) { return false; } KeyInfo thekey(key,keylen,CONDOR_3DES); m_crypto = new Condor_Crypt_3des(thekey); return m_crypto ? true : false; }
DoS Exec Code
0
Condor_Auth_SSL::setup_crypto(unsigned char* key, const int keylen) { if ( m_crypto ) delete m_crypto; m_crypto = NULL; if ( !key || !keylen ) { return false; } KeyInfo thekey(key,keylen,CONDOR_3DES); m_crypto = new Condor_Crypt_3des(thekey); return m_crypto ? true : false; }
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,046
SSL_CTX *Condor_Auth_SSL :: setup_ssl_ctx( bool is_server ) { SSL_CTX *ctx = NULL; char *cafile = NULL; char *cadir = NULL; char *certfile = NULL; char *keyfile = NULL; char *cipherlist = NULL; priv_state priv; if( is_server ) { cafile = param( AUTH_SSL_...
DoS Exec Code
0
SSL_CTX *Condor_Auth_SSL :: setup_ssl_ctx( bool is_server ) { SSL_CTX *ctx = NULL; char *cafile = NULL; char *cadir = NULL; char *certfile = NULL; char *keyfile = NULL; char *cipherlist = NULL; priv_state priv; if( is_server ) { cafile = param( AUTH_SSL_...
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,047
Condor_Auth_SSL::wrap(char * input, int input_len, char*& output, int& output_len) { bool result; unsigned char* in = (unsigned char*)input; unsigned char* out = (unsigned char*)output; dprintf(D_SECURITY, "In wrap.\n"); result = encrypt(in,input_len,out,output_len); output ...
DoS Exec Code
0
Condor_Auth_SSL::wrap(char * input, int input_len, char*& output, int& output_len) { bool result; unsigned char* in = (unsigned char*)input; unsigned char* out = (unsigned char*)output; dprintf(D_SECURITY, "In wrap.\n"); result = encrypt(in,input_len,out,output_len); output ...
@@ -21,7 +21,7 @@ #include "condor_common.h" #if !defined(SKIP_AUTHENTICATION) && defined(HAVE_EXT_OPENSSL) -#define ouch(x) dprintf(D_ALWAYS,x) +#define ouch(x) dprintf(D_ALWAYS,"%s",x) #include "authentication.h" #include "condor_auth_ssl.h" #include "condor_string.h"
CWE-134
null
null
13,048
SafeSock::SafeSock() /* virgin safesock */ : Sock() { init(); }
DoS Exec Code
0
SafeSock::SafeSock() /* virgin safesock */ : Sock() { init(); }
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,049
SafeSock::SafeSock(const SafeSock & orig) : Sock(orig) { init(); char *buf = NULL; buf = orig.serialize(); // get state from orig sock ASSERT(buf); serialize(buf); // put the state into the new sock delete [] buf; }
DoS Exec Code
0
SafeSock::SafeSock(const SafeSock & orig) : Sock(orig) { init(); char *buf = NULL; buf = orig.serialize(); // get state from orig sock ASSERT(buf); serialize(buf); // put the state into the new sock delete [] buf; }
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,050
__static_initializer() { mt_init(); }
DoS Exec Code
0
__static_initializer() { mt_init(); }
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,051
int SafeSock::attach_to_file_desc(int fd) { if (_state != sock_virgin) return FALSE; _sock = fd; _state = sock_connect; timeout(0); // make certain in block mode return TRUE; }
DoS Exec Code
0
int SafeSock::attach_to_file_desc(int fd) { if (_state != sock_virgin) return FALSE; _sock = fd; _state = sock_connect; timeout(0); // make certain in block mode return TRUE; }
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,052
SafeSock::cancel_reverse_connect() { }
DoS Exec Code
0
SafeSock::cancel_reverse_connect() { }
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,053
int SafeSock::connect( char const *host, int port, bool ) { if (!host || port < 0) return FALSE; _who.clear(); if (!Sock::guess_address_string(host, port, _who)) return FALSE; if (host[0] == '<') { set_connect_addr(host); } else { set_connect_addr(_who.to_sinful().Value()); } addr_changed(); ...
DoS Exec Code
0
int SafeSock::connect( char const *host, int port, bool ) { if (!host || port < 0) return FALSE; _who.clear(); if (!Sock::guess_address_string(host, port, _who)) return FALSE; if (host[0] == '<') { set_connect_addr(host); } else { set_connect_addr(_who.to_sinful().Value()); } addr_changed(); ...
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,054
void SafeSock::dumpSock() { _condorInMsg *tempMsg; dprintf(D_NETWORK, "[In] Long Messages\n"); for(int i=0; i<SAFE_SOCK_HASH_BUCKET_SIZE; i++) { dprintf(D_NETWORK, "\nBucket [%d]\n", i); tempMsg = _inMsgs[i]; while(tempMsg) { tempMsg->dumpMsg(); tempMsg = tempMsg->nextMsg; } } dprintf(D_NETWORK, "\...
DoS Exec Code
0
void SafeSock::dumpSock() { _condorInMsg *tempMsg; dprintf(D_NETWORK, "[In] Long Messages\n"); for(int i=0; i<SAFE_SOCK_HASH_BUCKET_SIZE; i++) { dprintf(D_NETWORK, "\nBucket [%d]\n", i); tempMsg = _inMsgs[i]; while(tempMsg) { tempMsg->dumpMsg(); tempMsg = tempMsg->nextMsg; } } dprintf(D_NETWORK, "\...
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,055
int SafeSock::end_of_message() { int ret_val = FALSE; int sent; unsigned char * md = 0; switch(_coding){ case stream_encode: if (mdChecker_) { md = mdChecker_->computeMD(); } sent = _outMsg.sendMsg(_sock, _who, _outMsgID, md); if (...
DoS Exec Code
0
int SafeSock::end_of_message() { int ret_val = FALSE; int sent; unsigned char * md = 0; switch(_coding){ case stream_encode: if (mdChecker_) { md = mdChecker_->computeMD(); } sent = _outMsg.sendMsg(_sock, _who, _outMsgID, md); if (...
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,056
int SafeSock::getMsgSize() { int result; while(!_msgReady) { if(_timeout > 0) { Selector selector; selector.set_timeout( _timeout ); selector.add_fd( _sock, Selector::IO_READ ); selector.execute(); if ( selector.timed_out() ) { return 0; } else if ( !selector.has_ready() ) { dprintf...
DoS Exec Code
0
int SafeSock::getMsgSize() { int result; while(!_msgReady) { if(_timeout > 0) { Selector selector; selector.set_timeout( _timeout ); selector.add_fd( _sock, Selector::IO_READ ); selector.execute(); if ( selector.timed_out() ) { return 0; } else if ( !selector.has_ready() ) { dprintf...
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,057
void SafeSock::getStat(unsigned long &noMsgs, unsigned long &noWhole, unsigned long &noDeleted, unsigned long &avgMsgSize, unsigned long &szComplete, unsigned long &szDeleted) { noMsgs = _noMsgs; noWhole = _whole; noDeleted = _deleted; avgMsgSize = _outMsg.getA...
DoS Exec Code
0
void SafeSock::getStat(unsigned long &noMsgs, unsigned long &noWhole, unsigned long &noDeleted, unsigned long &avgMsgSize, unsigned long &szComplete, unsigned long &szDeleted) { noMsgs = _noMsgs; noWhole = _whole; noDeleted = _deleted; avgMsgSize = _outMsg.getA...
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,058
int SafeSock::get_ptr(void *&ptr, char delim) { int size; while(!_msgReady) { if(_timeout > 0) { Selector selector; selector.set_timeout( _timeout ); selector.add_fd( _sock, Selector::IO_READ ); selector.execute(); if ( selector.timed_out() ) { return 0; } else if ( !selector.has_ready()...
DoS Exec Code
0
int SafeSock::get_ptr(void *&ptr, char delim) { int size; while(!_msgReady) { if(_timeout > 0) { Selector selector; selector.set_timeout( _timeout ); selector.add_fd( _sock, Selector::IO_READ ); selector.execute(); if ( selector.timed_out() ) { return 0; } else if ( !selector.has_ready()...
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,059
void SafeSock::init() { _special_state = safesock_none; for(int i=0; i<SAFE_SOCK_HASH_BUCKET_SIZE; i++) _inMsgs[i] = NULL; _msgReady = false; _longMsg = NULL; _tOutBtwPkts = SAFE_SOCK_MAX_BTW_PKT_ARVL; if(_outMsgID.msgNo == 0) { // first object of this class _outMsgID.ip_addr = mt_random(); _outMsgID.pid...
DoS Exec Code
0
void SafeSock::init() { _special_state = safesock_none; for(int i=0; i<SAFE_SOCK_HASH_BUCKET_SIZE; i++) _inMsgs[i] = NULL; _msgReady = false; _longMsg = NULL; _tOutBtwPkts = SAFE_SOCK_MAX_BTW_PKT_ARVL; if(_outMsgID.msgNo == 0) { // first object of this class _outMsgID.ip_addr = mt_random(); _outMsgID.pid...
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,060
bool SafeSock :: init_MD(CONDOR_MD_MODE /* mode */, KeyInfo * key, const char * keyId) { bool inited = true; if (mdChecker_) { delete mdChecker_; mdChecker_ = 0; } if (key) { mdChecker_ = new Condor_MD_MAC(key); } if (_longMsg) { inited = _longMsg->verifyM...
DoS Exec Code
0
bool SafeSock :: init_MD(CONDOR_MD_MODE /* mode */, KeyInfo * key, const char * keyId) { bool inited = true; if (mdChecker_) { delete mdChecker_; mdChecker_ = 0; } if (key) { mdChecker_ = new Condor_MD_MAC(key); } if (_longMsg) { inited = _longMsg->verifyM...
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,061
const char * SafeSock :: isIncomingDataEncrypted() { char c; if (!peek(c)) { return 0; } else { if(_longMsg) { return _longMsg->isDataEncrypted(); } else { // short message return _shortMsg.isDataEncrypted(); } } }
DoS Exec Code
0
const char * SafeSock :: isIncomingDataEncrypted() { char c; if (!peek(c)) { return 0; } else { if(_longMsg) { return _longMsg->isDataEncrypted(); } else { // short message return _shortMsg.isDataEncrypted(); } } }
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,062
const char * SafeSock :: isIncomingDataMD5ed() { char c; if (!peek(c)) { return 0; } else { if(_longMsg) { return _longMsg->isDataMD5ed(); } else { // short message return _shortMsg.isDataMD5ed(); } } }
DoS Exec Code
0
const char * SafeSock :: isIncomingDataMD5ed() { char c; if (!peek(c)) { return 0; } else { if(_longMsg) { return _longMsg->isDataMD5ed(); } else { // short message return _shortMsg.isDataMD5ed(); } } }
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,063
int SafeSock::peek(char &c) { while(!_msgReady) { if(_timeout > 0) { Selector selector; selector.set_timeout( _timeout ); selector.add_fd( _sock, Selector::IO_READ ); selector.execute(); if ( selector.timed_out() ) { return 0; } else if ( !selector.has_ready() ) { dprintf(D_NETWORK, ...
DoS Exec Code
0
int SafeSock::peek(char &c) { while(!_msgReady) { if(_timeout > 0) { Selector selector; selector.set_timeout( _timeout ); selector.add_fd( _sock, Selector::IO_READ ); selector.execute(); if ( selector.timed_out() ) { return 0; } else if ( !selector.has_ready() ) { dprintf(D_NETWORK, ...
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,064
SafeSock::peek_end_of_message() { if(_msgReady) { if(_longMsg) { // long message is ready if(_longMsg->consumed()) { return true; } } else { // short message is ready if(_shortMsg.consumed()) return true; } } return false; }
DoS Exec Code
0
SafeSock::peek_end_of_message() { if(_msgReady) { if(_longMsg) { // long message is ready if(_longMsg->consumed()) { return true; } } else { // short message is ready if(_shortMsg.consumed()) return true; } } return false; }
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,065
int SafeSock::put_bytes(const void *data, int sz) { int bytesPut, l_out; unsigned char * dta = 0; if (get_encryption()) { if (!wrap((unsigned char *)data, sz, dta , l_out)) { dprintf(D_SECURITY, "Encryption failed\n"); return -1; // encryption failed! } } els...
DoS Exec Code
0
int SafeSock::put_bytes(const void *data, int sz) { int bytesPut, l_out; unsigned char * dta = 0; if (get_encryption()) { if (!wrap((unsigned char *)data, sz, dta , l_out)) { dprintf(D_SECURITY, "Encryption failed\n"); return -1; // encryption failed! } } els...
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,066
SafeSock::sendTargetSharedPortID() { return true; }
DoS Exec Code
0
SafeSock::sendTargetSharedPortID() { return true; }
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,067
char * SafeSock::serialize() const { char * parent_state = Sock::serialize(); char outbuf[50]; memset(outbuf, 0, 50); sprintf(outbuf,"%d*%s*", _special_state, _who.to_sinful().Value()); strcat(parent_state,outbuf); return( parent_state ); }
DoS Exec Code
0
char * SafeSock::serialize() const { char * parent_state = Sock::serialize(); char outbuf[50]; memset(outbuf, 0, 50); sprintf(outbuf,"%d*%s*", _special_state, _who.to_sinful().Value()); strcat(parent_state,outbuf); return( parent_state ); }
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,068
char * SafeSock::serialize(char *buf) { char sinful_string[28]; char usernamebuf[128]; char *ptmp, *ptr = NULL; ASSERT(buf); memset(sinful_string, 0, 28); memset(usernamebuf, 0, 128); ptmp = Sock::serialize(buf); ASSERT( ptmp ); int itmp; sscanf(ptmp,"%d*",&itmp); _special_state=safesock_state(it...
DoS Exec Code
0
char * SafeSock::serialize(char *buf) { char sinful_string[28]; char usernamebuf[128]; char *ptmp, *ptr = NULL; ASSERT(buf); memset(sinful_string, 0, 28); memset(usernamebuf, 0, 128); ptmp = Sock::serialize(buf); ASSERT( ptmp ); int itmp; sscanf(ptmp,"%d*",&itmp); _special_state=safesock_state(it...
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,069
SafeSock::setTargetSharedPortID( char const *id) { if( id ) { dprintf(D_ALWAYS, "WARNING: UDP does not support connecting to a shared port! " "(requested address is %s with SharedPortID=%s)\n", peer_description(), id); } }
DoS Exec Code
0
SafeSock::setTargetSharedPortID( char const *id) { if( id ) { dprintf(D_ALWAYS, "WARNING: UDP does not support connecting to a shared port! " "(requested address is %s with SharedPortID=%s)\n", peer_description(), id); } }
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,070
bool SafeSock :: set_encryption_id(const char * keyId) { return _outMsg.set_encryption_id(keyId); }
DoS Exec Code
0
bool SafeSock :: set_encryption_id(const char * keyId) { return _outMsg.set_encryption_id(keyId); }
@@ -622,7 +622,7 @@ int SafeSock::handle_incoming_packet() return FALSE; } char str[50]; - sprintf(str, sock_to_string(_sock)); + sprintf(str, "%s", sock_to_string(_sock)); dprintf( D_NETWORK, "RECV %d bytes at %s from %s\n", received, str, _who.to_sinful...
CWE-134
null
null
13,071
actionWord( JobAction action, bool past ) { switch( action ) { case JA_RELEASE_JOBS: return past ? "released" : "release"; break; case JA_HOLD_JOBS: return past ? "held" : "hold"; break; case JA_SUSPEND_JOBS: return past ? "suspended" : "suspend"; break; case JA_CONTINUE_JOBS: return past ? "co...
DoS Exec Code
0
actionWord( JobAction action, bool past ) { switch( action ) { case JA_RELEASE_JOBS: return past ? "released" : "release"; break; case JA_HOLD_JOBS: return past ? "held" : "hold"; break; case JA_SUSPEND_JOBS: return past ? "suspended" : "suspend"; break; case JA_CONTINUE_JOBS: return past ? "co...
@@ -114,7 +114,7 @@ void usage(int iExitCode) { char word[32]; - sprintf( word, getJobActionString(mode) ); + sprintf( word, "%s", getJobActionString(mode) ); fprintf( stderr, "Usage: %s [options] [constraints]\n", MyName ); fprintf( stderr, " where [options] is zero or more of:\n"...
CWE-134
null
null
13,072
addConstraint( const char *constraint ) { static bool has_clause = false; if( has_clause ) { global_constraint += " && ("; } else { global_constraint += "("; } global_constraint += constraint; global_constraint += ")"; has_clause = true; has_constraint = true; }
DoS Exec Code
0
addConstraint( const char *constraint ) { static bool has_clause = false; if( has_clause ) { global_constraint += " && ("; } else { global_constraint += "("; } global_constraint += constraint; global_constraint += ")"; has_clause = true; has_constraint = true; }
@@ -114,7 +114,7 @@ void usage(int iExitCode) { char word[32]; - sprintf( word, getJobActionString(mode) ); + sprintf( word, "%s", getJobActionString(mode) ); fprintf( stderr, "Usage: %s [options] [constraints]\n", MyName ); fprintf( stderr, " where [options] is zero or more of:\n"...
CWE-134
null
null
13,073
doWorkByConstraint( const char* constraint, CondorError * errstack ) { ClassAd* ad = 0; int total_jobs = -1; bool rval = true; switch( mode ) { case JA_RELEASE_JOBS: ad = schedd->releaseJobs( constraint, actionReason, errstack ); break; case JA_REMOVE_X_JOBS: ad = schedd->removeXJobs( constraint, actionReas...
DoS Exec Code
0
doWorkByConstraint( const char* constraint, CondorError * errstack ) { ClassAd* ad = 0; int total_jobs = -1; bool rval = true; switch( mode ) { case JA_RELEASE_JOBS: ad = schedd->releaseJobs( constraint, actionReason, errstack ); break; case JA_REMOVE_X_JOBS: ad = schedd->removeXJobs( constraint, actionReas...
@@ -114,7 +114,7 @@ void usage(int iExitCode) { char word[32]; - sprintf( word, getJobActionString(mode) ); + sprintf( word, "%s", getJobActionString(mode) ); fprintf( stderr, "Usage: %s [options] [constraints]\n", MyName ); fprintf( stderr, " where [options] is zero or more of:\n"...
CWE-134
null
null
13,074
doWorkByList( StringList* ids, CondorError *errstack ) { ClassAd* rval = 0; switch( mode ) { case JA_RELEASE_JOBS: rval = schedd->releaseJobs( ids, actionReason, errstack ); break; case JA_REMOVE_X_JOBS: rval = schedd->removeXJobs( ids, actionReason, errstack ); break; case JA_VACATE_JOBS: rval = schedd-...
DoS Exec Code
0
doWorkByList( StringList* ids, CondorError *errstack ) { ClassAd* rval = 0; switch( mode ) { case JA_RELEASE_JOBS: rval = schedd->releaseJobs( ids, actionReason, errstack ); break; case JA_REMOVE_X_JOBS: rval = schedd->removeXJobs( ids, actionReason, errstack ); break; case JA_VACATE_JOBS: rval = schedd-...
@@ -114,7 +114,7 @@ void usage(int iExitCode) { char word[32]; - sprintf( word, getJobActionString(mode) ); + sprintf( word, "%s", getJobActionString(mode) ); fprintf( stderr, "Usage: %s [options] [constraints]\n", MyName ); fprintf( stderr, " where [options] is zero or more of:\n"...
CWE-134
null
null
13,075
handleAll() { char constraint[128]; sprintf( constraint, "%s >= 0", ATTR_CLUSTER_ID ); CondorError errstack; if( doWorkByConstraint(constraint, &errstack) ) { fprintf( stdout, "All jobs %s.\n", (mode == JA_REMOVE_JOBS) ? "marked for removal" : (mode == JA_REMOVE_X_JOBS) ? "removed locally (re...
DoS Exec Code
0
handleAll() { char constraint[128]; sprintf( constraint, "%s >= 0", ATTR_CLUSTER_ID ); CondorError errstack; if( doWorkByConstraint(constraint, &errstack) ) { fprintf( stdout, "All jobs %s.\n", (mode == JA_REMOVE_JOBS) ? "marked for removal" : (mode == JA_REMOVE_X_JOBS) ? "removed locally (re...
@@ -114,7 +114,7 @@ void usage(int iExitCode) { char word[32]; - sprintf( word, getJobActionString(mode) ); + sprintf( word, "%s", getJobActionString(mode) ); fprintf( stderr, "Usage: %s [options] [constraints]\n", MyName ); fprintf( stderr, " where [options] is zero or more of:\n"...
CWE-134
null
null
13,076
main( int argc, char *argv[] ) { char *arg; char **args = (char **)malloc(sizeof(char *)*(argc - 1)); // args int nArgs = 0; // number of args int i; char* cmd_str; DCCollector* pool = NULL; char* scheddName = NULL; char* scheddAddr = NULL; param_functions *p_funcs = NULL; has_constraint = false...
DoS Exec Code
0
main( int argc, char *argv[] ) { char *arg; char **args = (char **)malloc(sizeof(char *)*(argc - 1)); // args int nArgs = 0; // number of args int i; char* cmd_str; DCCollector* pool = NULL; char* scheddName = NULL; char* scheddAddr = NULL; param_functions *p_funcs = NULL; has_constraint = false...
@@ -114,7 +114,7 @@ void usage(int iExitCode) { char word[32]; - sprintf( word, getJobActionString(mode) ); + sprintf( word, "%s", getJobActionString(mode) ); fprintf( stderr, "Usage: %s [options] [constraints]\n", MyName ); fprintf( stderr, " where [options] is zero or more of:\n"...
CWE-134
null
null
13,077
printNewMessages( ClassAd* result_ad, StringList* ids ) { char* tmp; char* msg; PROC_ID job_id; bool rval; JobActionResults results; results.readResults( result_ad ); ids->rewind(); while( (tmp = ids->next()) ) { job_id = getProcByString( tmp ); rval = results.getResultString( job_id, &msg ); if( rval )...
DoS Exec Code
0
printNewMessages( ClassAd* result_ad, StringList* ids ) { char* tmp; char* msg; PROC_ID job_id; bool rval; JobActionResults results; results.readResults( result_ad ); ids->rewind(); while( (tmp = ids->next()) ) { job_id = getProcByString( tmp ); rval = results.getResultString( job_id, &msg ); if( rval )...
@@ -114,7 +114,7 @@ void usage(int iExitCode) { char word[32]; - sprintf( word, getJobActionString(mode) ); + sprintf( word, "%s", getJobActionString(mode) ); fprintf( stderr, "Usage: %s [options] [constraints]\n", MyName ); fprintf( stderr, " where [options] is zero or more of:\n"...
CWE-134
null
null
13,078
procArg(const char* arg) { int c, p; // cluster/proc # char* tmp; MyString constraint; if( str_isint(arg) || str_isreal(arg,true) ) { c = strtol(arg, &tmp, 10); if(c <= 0) { fprintf(stderr, "Invalid cluster # from %s.\n", arg); had_error = true; return; } if(*tmp == '\0') { Condor...
DoS Exec Code
0
procArg(const char* arg) { int c, p; // cluster/proc # char* tmp; MyString constraint; if( str_isint(arg) || str_isreal(arg,true) ) { c = strtol(arg, &tmp, 10); if(c <= 0) { fprintf(stderr, "Invalid cluster # from %s.\n", arg); had_error = true; return; } if(*tmp == '\0') { Condor...
@@ -114,7 +114,7 @@ void usage(int iExitCode) { char word[32]; - sprintf( word, getJobActionString(mode) ); + sprintf( word, "%s", getJobActionString(mode) ); fprintf( stderr, "Usage: %s [options] [constraints]\n", MyName ); fprintf( stderr, " where [options] is zero or more of:\n"...
CWE-134
null
null
13,079
static bool read_access(const char * filename ) { return thisRemoteResource->allowRemoteReadFileAccess( filename ); }
DoS Exec Code
0
static bool read_access(const char * filename ) { return thisRemoteResource->allowRemoteReadFileAccess( filename ); }
@@ -1397,7 +1397,7 @@ case CONDOR_getdir: // Get directory's contents while((next = directory.Next())) { - msg.sprintf_cat(next); + msg.sprintf_cat("%s", next); msg.sprintf_cat("\n"); } ...
CWE-134
null
null
13,080
static const char * shadow_syscall_name(int condor_sysnum) { switch(condor_sysnum) { case CONDOR_register_job_info: return "register_job_info"; case CONDOR_register_starter_info: return "register_starter_info"; case CONDOR_get_job_info: return "get_job_info"; case CONDOR_get_user_info: ...
DoS Exec Code
0
static const char * shadow_syscall_name(int condor_sysnum) { switch(condor_sysnum) { case CONDOR_register_job_info: return "register_job_info"; case CONDOR_register_starter_info: return "register_starter_info"; case CONDOR_get_job_info: return "get_job_info"; case CONDOR_get_user_info: ...
@@ -1397,7 +1397,7 @@ case CONDOR_getdir: // Get directory's contents while((next = directory.Next())) { - msg.sprintf_cat(next); + msg.sprintf_cat("%s", next); msg.sprintf_cat("\n"); } ...
CWE-134
null
null
13,081
static int statfs_string( char *line, struct statvfs *info ) #else static int statfs_string( char *line, struct statfs *info ) #endif { #ifdef WIN32 return 0; #else return sprintf(line,"%lld %lld %lld %lld %lld %lld %lld\n", # if defined(Solaris) (long long) info->f_fsid, (long long) info->f_frsize, # else (l...
DoS Exec Code
0
static int statfs_string( char *line, struct statvfs *info ) #else static int statfs_string( char *line, struct statfs *info ) #endif { #ifdef WIN32 return 0; #else return sprintf(line,"%lld %lld %lld %lld %lld %lld %lld\n", # if defined(Solaris) (long long) info->f_fsid, (long long) info->f_frsize, # else (l...
@@ -1397,7 +1397,7 @@ case CONDOR_getdir: // Get directory's contents while((next = directory.Next())) { - msg.sprintf_cat(next); + msg.sprintf_cat("%s", next); msg.sprintf_cat("\n"); } ...
CWE-134
null
null
13,082
static bool write_access(const char * filename ) { return thisRemoteResource->allowRemoteWriteFileAccess( filename ); }
DoS Exec Code
0
static bool write_access(const char * filename ) { return thisRemoteResource->allowRemoteWriteFileAccess( filename ); }
@@ -1397,7 +1397,7 @@ case CONDOR_getdir: // Get directory's contents while((next = directory.Next())) { - msg.sprintf_cat(next); + msg.sprintf_cat("%s", next); msg.sprintf_cat("\n"); } ...
CWE-134
null
null
13,083
BaseShadow::BaseShadow() { spool = NULL; fsDomain = uidDomain = NULL; jobAd = NULL; remove_requested = false; cluster = proc = -1; gjid = NULL; core_file_name = NULL; scheddAddr = NULL; job_updater = NULL; ASSERT( !myshadow_ptr ); // make cetain we're only instantiated once myshadow_ptr = this; exception_al...
DoS Exec Code
0
BaseShadow::BaseShadow() { spool = NULL; fsDomain = uidDomain = NULL; jobAd = NULL; remove_requested = false; cluster = proc = -1; gjid = NULL; core_file_name = NULL; scheddAddr = NULL; job_updater = NULL; ASSERT( !myshadow_ptr ); // make cetain we're only instantiated once myshadow_ptr = this; exception_al...
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null
13,084
BaseShadow::baseInit( ClassAd *job_ad, const char* schedd_addr, const char *xfer_queue_contact_info ) { int pending = FALSE; if( ! job_ad ) { EXCEPT("baseInit() called with NULL job_ad!"); } jobAd = job_ad; if (sendUpdatesToSchedd && ! is_valid_sinful(schedd_addr)) { EXCEPT("schedd_addr not specified with va...
DoS Exec Code
0
BaseShadow::baseInit( ClassAd *job_ad, const char* schedd_addr, const char *xfer_queue_contact_info ) { int pending = FALSE; if( ! job_ad ) { EXCEPT("baseInit() called with NULL job_ad!"); } jobAd = job_ad; if (sendUpdatesToSchedd && ! is_valid_sinful(schedd_addr)) { EXCEPT("schedd_addr not specified with va...
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null
13,085
int BaseShadow::cdToIwd() { int iRet =0; #if ! defined(WIN32) priv_state p = PRIV_UNKNOWN; if (m_RunAsNobody) p = set_root_priv(); #endif if (chdir(iwd.Value()) < 0) { int chdir_errno = errno; dprintf(D_ALWAYS, "\n\nPath does not exist.\n" "He who travels without bounds\n" "Can't locate data.\n\...
DoS Exec Code
0
int BaseShadow::cdToIwd() { int iRet =0; #if ! defined(WIN32) priv_state p = PRIV_UNKNOWN; if (m_RunAsNobody) p = set_root_priv(); #endif if (chdir(iwd.Value()) < 0) { int chdir_errno = errno; dprintf(D_ALWAYS, "\n\nPath does not exist.\n" "He who travels without bounds\n" "Can't locate data.\n\...
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null
13,086
BaseShadow::checkSwap( void ) { int reserved_swap, free_swap; reserved_swap = param_integer( "RESERVED_SWAP", 0 ); reserved_swap *= 1024; if( reserved_swap == 0 ) { return; } free_swap = sysapi_swap_space(); dprintf( D_FULLDEBUG, "*** Reserved Swap = %d\n", reserved_swap ); dprintf( D_FULLDEBUG, "*** Free ...
DoS Exec Code
0
BaseShadow::checkSwap( void ) { int reserved_swap, free_swap; reserved_swap = param_integer( "RESERVED_SWAP", 0 ); reserved_swap *= 1024; if( reserved_swap == 0 ) { return; } free_swap = sysapi_swap_space(); dprintf( D_FULLDEBUG, "*** Reserved Swap = %d\n", reserved_swap ); dprintf( D_FULLDEBUG, "*** Free ...
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null
13,087
display_dprintf_header(char **buf,int *bufpos,int *buflen) { static pid_t mypid = 0; int mycluster = -1; int myproc = -1; if (!mypid) { mypid = daemonCore->getpid(); } if (Shadow) { mycluster = Shadow->getCluster(); myproc = Shadow->getProc(); } if ( mycluster != -1 ) { return sprintf_realloc( buf, b...
DoS Exec Code
0
display_dprintf_header(char **buf,int *bufpos,int *buflen) { static pid_t mypid = 0; int mycluster = -1; int myproc = -1; if (!mypid) { mypid = daemonCore->getpid(); } if (Shadow) { mycluster = Shadow->getCluster(); myproc = Shadow->getProc(); } if ( mycluster != -1 ) { return sprintf_realloc( buf, b...
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null
13,088
BaseShadow::emailHoldEvent( const char* reason ) { Email mailer; mailer.sendHold( jobAd, reason ); }
DoS Exec Code
0
BaseShadow::emailHoldEvent( const char* reason ) { Email mailer; mailer.sendHold( jobAd, reason ); }
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null
13,089
BaseShadow::emailRemoveEvent( const char* reason ) { Email mailer; mailer.sendRemove( jobAd, reason ); }
DoS Exec Code
0
BaseShadow::emailRemoveEvent( const char* reason ) { Email mailer; mailer.sendRemove( jobAd, reason ); }
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null
13,090
BaseShadow::emailUser( const char *subjectline ) { dprintf(D_FULLDEBUG, "BaseShadow::emailUser() called.\n"); if( !jobAd ) { return NULL; } return email_user_open( jobAd, subjectline ); }
DoS Exec Code
0
BaseShadow::emailUser( const char *subjectline ) { dprintf(D_FULLDEBUG, "BaseShadow::emailUser() called.\n"); if( !jobAd ) { return NULL; } return email_user_open( jobAd, subjectline ); }
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null
13,091
BaseShadow::evictJob( int reason ) { MyString from_where; MyString machine; if( getMachineName(machine) ) { from_where.sprintf(" from %s",machine.Value()); } dprintf( D_ALWAYS, "Job %d.%d is being evicted%s\n", getCluster(), getProc(), from_where.Value() ); if( ! jobAd ) { dprintf( D_ALWAYS, "In evictJob...
DoS Exec Code
0
BaseShadow::evictJob( int reason ) { MyString from_where; MyString machine; if( getMachineName(machine) ) { from_where.sprintf(" from %s",machine.Value()); } dprintf( D_ALWAYS, "Job %d.%d is being evicted%s\n", getCluster(), getProc(), from_where.Value() ); if( ! jobAd ) { dprintf( D_ALWAYS, "In evictJob...
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null
13,092
BaseShadow::getCoreName( void ) { if( core_file_name ) { return core_file_name; } return "unknown"; }
DoS Exec Code
0
BaseShadow::getCoreName( void ) { if( core_file_name ) { return core_file_name; } return "unknown"; }
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null
13,093
int getJobAdExitCode(ClassAd *jad, int &exit_code) { if( ! jad->LookupInteger(ATTR_ON_EXIT_CODE, exit_code) ) { return FALSE; } return TRUE; }
DoS Exec Code
0
int getJobAdExitCode(ClassAd *jad, int &exit_code) { if( ! jad->LookupInteger(ATTR_ON_EXIT_CODE, exit_code) ) { return FALSE; } return TRUE; }
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null
13,094
int getJobAdExitSignal(ClassAd *jad, int &exit_signal) { if( ! jad->LookupInteger(ATTR_ON_EXIT_SIGNAL, exit_signal) ) { return FALSE; } return TRUE; }
DoS Exec Code
0
int getJobAdExitSignal(ClassAd *jad, int &exit_signal) { if( ! jad->LookupInteger(ATTR_ON_EXIT_SIGNAL, exit_signal) ) { return FALSE; } return TRUE; }
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null
13,095
int getJobAdExitedBySignal(ClassAd *jad, int &exited_by_signal) { if( ! jad->LookupInteger(ATTR_ON_EXIT_BY_SIGNAL, exited_by_signal) ) { return FALSE; } return TRUE; }
DoS Exec Code
0
int getJobAdExitedBySignal(ClassAd *jad, int &exited_by_signal) { if( ! jad->LookupInteger(ATTR_ON_EXIT_BY_SIGNAL, exited_by_signal) ) { return FALSE; } return TRUE; }
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null
13,096
BaseShadow::getMachineName( MyString & /*machineName*/ ) { return false; }
DoS Exec Code
0
BaseShadow::getMachineName( MyString & /*machineName*/ ) { return false; }
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null
13,097
BaseShadow::handleUpdateJobAd( int sig ) { dprintf ( D_FULLDEBUG, "In handleUpdateJobAd, sig %d\n", sig ); if (!job_updater->retrieveJobUpdates()) { dprintf(D_ALWAYS, "Error: Failed to update JobAd\n"); return -1; } shadow_user_policy.checkPeriodic(); return 0; }
DoS Exec Code
0
BaseShadow::handleUpdateJobAd( int sig ) { dprintf ( D_FULLDEBUG, "In handleUpdateJobAd, sig %d\n", sig ); if (!job_updater->retrieveJobUpdates()) { dprintf(D_ALWAYS, "Error: Failed to update JobAd\n"); return -1; } shadow_user_policy.checkPeriodic(); return 0; }
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null
13,098
BaseShadow::holdJob( const char* reason, int hold_reason_code, int hold_reason_subcode ) { dprintf( D_ALWAYS, "Job %d.%d going into Hold state (code %d,%d): %s\n", getCluster(), getProc(), hold_reason_code, hold_reason_subcode,reason ); if( ! jobAd ) { dprintf( D_ALWAYS, "In HoldJob() w/ NULL JobAd!" ); DC_...
DoS Exec Code
0
BaseShadow::holdJob( const char* reason, int hold_reason_code, int hold_reason_subcode ) { dprintf( D_ALWAYS, "Job %d.%d going into Hold state (code %d,%d): %s\n", getCluster(), getProc(), hold_reason_code, hold_reason_subcode,reason ); if( ! jobAd ) { dprintf( D_ALWAYS, "In HoldJob() w/ NULL JobAd!" ); DC_...
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null
13,099
BaseShadow::holdJobAndExit( const char* reason, int hold_reason_code, int hold_reason_subcode ) { holdJob(reason,hold_reason_code,hold_reason_subcode); DC_Exit( JOB_SHOULD_HOLD ); }
DoS Exec Code
0
BaseShadow::holdJobAndExit( const char* reason, int hold_reason_code, int hold_reason_subcode ) { holdJob(reason,hold_reason_code,hold_reason_subcode); DC_Exit( JOB_SHOULD_HOLD ); }
@@ -1141,7 +1141,7 @@ BaseShadow::log_except(const char *msg) bool exception_already_logged = false; if(!msg) msg = ""; - sprintf(event.message, msg); + sprintf(event.message, "%s", msg); if ( BaseShadow::myshadow_ptr ) { BaseShadow *shadow = BaseShadow::myshadow_...
CWE-134
null
null