diff --git a/client/thread.cpp b/client/thread.cpp index a8fc0960c7..951193fe61 100644 --- a/client/thread.cpp +++ b/client/thread.cpp @@ -29,7 +29,8 @@ int THREAD::run(void*(*func)(void*), void* _arg) { pthread_t id; pthread_attr_t thread_attrs; pthread_attr_init(&thread_attrs); - pthread_create(&id, &thread_attrs, func, this); + int retval = pthread_create(&id, &thread_attrs, func, this); + if (retval) return retval; #endif arg = _arg; return 0; diff --git a/lib/remote_submit.h b/lib/remote_submit.h index 799055260e..12aeef9ec3 100644 --- a/lib/remote_submit.h +++ b/lib/remote_submit.h @@ -95,7 +95,6 @@ struct COMPLETED_JOB_DESC { double cpu_time; string stderr_out; - COMPLETED_JOB_DESC(){} int parse(XML_PARSER&); }; diff --git a/samples/condor/boinc_gahp.cpp b/samples/condor/boinc_gahp.cpp index 007769ce32..6c55b8508a 100644 --- a/samples/condor/boinc_gahp.cpp +++ b/samples/condor/boinc_gahp.cpp @@ -41,6 +41,8 @@ using std::set; using std::string; using std::vector; +extern size_t strlcpy(char*, const char*, size_t); + char project_url[256]; char authenticator[256]; char response_prefix[256]; @@ -220,12 +222,12 @@ int process_input_files(SUBMIT_REQ& req, string& error_msg) { // parse the text coming from Condor // int COMMAND::parse_submit(char* p) { - strcpy(submit_req.batch_name, strtok_r(NULL, " ", &p)); - strcpy(submit_req.app_name, strtok_r(NULL, " ", &p)); + strlcpy(submit_req.batch_name, strtok_r(NULL, " ", &p), sizeof(submit_req.batch_name)); + strlcpy(submit_req.app_name, strtok_r(NULL, " ", &p), sizeof(submit_req.app_name)); int njobs = atoi(strtok_r(NULL, " ", &p)); for (int i=0; i