On Oct 13, 2015, at 3:49 PM, David Anderson <[email protected]> wrote:
> FYI.  I'm not sure how to fix these, or if they matter.

I examined the "defects" listed for the clientgui directory. The only one that 
represents an actual potential problem is CID 117629.  Although very unlikely, 
it could conceivably cause a crash.  I checked in a fix for that.

I did not examine the items for the sched or client directories.

Cheers,
--Charlie

> -------- Forwarded Message --------
> Subject:      New Defects reported by Coverity Scan for BOINC/boinc
> Date:         Tue, 13 Oct 2015 13:45:52 -0700
> From:         [email protected]
> To:   [email protected]
> 
> 
> 
> Hi,
> 
> Please find the latest report on new defect(s) introduced to BOINC/boinc 
> found with Coverity Scan.
> 
> 13 new defect(s) introduced to BOINC/boinc found with Coverity Scan.
> 14 defect(s), reported by Coverity Scan earlier, were marked fixed in the 
> recent build analyzed by Coverity Scan.
> 
> New defect(s) Reported-by: Coverity Scan
> Showing 13 of 13 defect(s)
> 
> 
> ** CID 117641:  Uninitialized members  (UNINIT_CTOR)
> /clientgui/DlgAdvPreferences.cpp: 105 in 
> CDlgAdvPreferences::CDlgAdvPreferences(wxWindow *)()
> 
> 
> ________________________________________________________________________________________________________
> *** CID 117641:  Uninitialized members  (UNINIT_CTOR)
> /clientgui/DlgAdvPreferences.cpp: 105 in 
> CDlgAdvPreferences::CDlgAdvPreferences(wxWindow *)()
> 99         SetSpecialTooltips();
> 100         //setting the validators for correct input handling
> 101         SetValidators();
> 102         //read in settings and initialize controls
> 103         ReadPreferenceSettings();
> 104
>>>>    CID 117641:  Uninitialized members  (UNINIT_CTOR)
>>>>    Non-static class member "lastErrorCtrl" is not initialized in this 
>>>> constructor nor in any functions that it calls.
> 105         if (! m_bOKToShow) return;
> 106
> 107         // Get default preference values
> 108         defaultPrefs.enabled_defaults();
> 109         //
> 110         RestoreState();
> 
> ** CID 117640:  Uninitialized members  (UNINIT_CTOR)
> /clientgui/DlgEventLogListCtrl.cpp: 42 in 
> MyEvtLogEvtHandler::MyEvtLogEvtHandler()()
> 
> 
> ________________________________________________________________________________________________________
> *** CID 117640:  Uninitialized members  (UNINIT_CTOR)
> /clientgui/DlgEventLogListCtrl.cpp: 42 in 
> MyEvtLogEvtHandler::MyEvtLogEvtHandler()()
> 36     IMPLEMENT_DYNAMIC_CLASS(MyEvtLogEvtHandler, wxEvtHandler)
> 37
> 38     BEGIN_EVENT_TABLE(MyEvtLogEvtHandler, wxEvtHandler)
> 39         EVT_PAINT(MyEvtLogEvtHandler::OnPaint)
> 40     END_EVENT_TABLE()
> 41
>>>>    CID 117640:  Uninitialized members  (UNINIT_CTOR)
>>>>    Non-static class member "m_view_startX" is not initialized in this 
>>>> constructor nor in any functions that it calls.
> 42     MyEvtLogEvtHandler::MyEvtLogEvtHandler() {}
> 43
> 44     MyEvtLogEvtHandler::MyEvtLogEvtHandler(wxGenericListCtrl 
> *theListControl) {
> 45         m_listCtrl = theListControl;
> 46         m_view_startX = 0;
> 47     }
> 
> ** CID 117639:  Uninitialized members  (UNINIT_CTOR)
> /clientgui/DlgEventLogListCtrl.cpp: 97 in 
> CDlgEventLogListCtrl::CDlgEventLogListCtrl(CDlgEventLog *, int, int)()
> 
> 
> ________________________________________________________________________________________________________
> *** CID 117639:  Uninitialized members  (UNINIT_CTOR)
> /clientgui/DlgEventLogListCtrl.cpp: 97 in 
> CDlgEventLogListCtrl::CDlgEventLogListCtrl(CDlgEventLog *, int, int)()
> 91
> 92     #ifdef __WXMAC__
> 93         m_fauxHeaderView = NULL;
> 94         m_fauxBodyView = NULL;
> 95         SetupMacAccessibilitySupport();
> 96     #endif
>>>>    CID 117639:  Uninitialized members  (UNINIT_CTOR)
>>>>    Non-static class member "savedHandler" is not initialized in this 
>>>> constructor nor in any functions that it calls.
> 97     }
> 98
> 99
> 100     #ifdef __WXMAC__
> 101     CDlgEventLogListCtrl::~CDlgEventLogListCtrl()
> 102     {
> 
> ** CID 117638:  Uninitialized members  (UNINIT_CTOR)
> /clientgui/sg_CustomControls.cpp: 142 in 
> CTransparentHyperlinkCtrl::CTransparentHyperlinkCtrl()()
> 
> 
> ________________________________________________________________________________________________________
> *** CID 117638:  Uninitialized members  (UNINIT_CTOR)
> /clientgui/sg_CustomControls.cpp: 142 in 
> CTransparentHyperlinkCtrl::CTransparentHyperlinkCtrl()()
> 136     BEGIN_EVENT_TABLE(CTransparentHyperlinkCtrl, wxHyperlinkCtrl)
> 137         EVT_ERASE_BACKGROUND(CTransparentHyperlinkCtrl::OnEraseBackground)
> 138         EVT_PAINT(CTransparentHyperlinkCtrl::OnPaint)
> 139     END_EVENT_TABLE()
> 140     #endif
> 141
>>>>    CID 117638:  Uninitialized members  (UNINIT_CTOR)
>>>>    Non-static class member "m_pParentsBgBmp" is not initialized in this 
>>>> constructor nor in any functions that it calls.
> 142     CTransparentHyperlinkCtrl::CTransparentHyperlinkCtrl() {}
> 143
> 144     CTransparentHyperlinkCtrl::CTransparentHyperlinkCtrl(wxWindow *parent,
> 145                         wxWindowID id,
> 146                         const wxString& label, const wxString& url,
> 147                         const wxPoint& pos,
> 
> ** CID 117637:  Uninitialized members  (UNINIT_CTOR)
> /clientgui/sg_CustomControls.cpp: 342 in 
> CTransparentCheckBox::CTransparentCheckBox()()
> 
> 
> ________________________________________________________________________________________________________
> *** CID 117637:  Uninitialized members  (UNINIT_CTOR)
> /clientgui/sg_CustomControls.cpp: 342 in 
> CTransparentCheckBox::CTransparentCheckBox()()
> 336     #ifndef __WXMAC__
> 337     BEGIN_EVENT_TABLE(CTransparentCheckBox, wxCheckBox)
> 338         EVT_ERASE_BACKGROUND(CTransparentCheckBox::OnEraseBackground)
> 339     END_EVENT_TABLE()
> 340     #endif
> 341
>>>>    CID 117637:  Uninitialized members  (UNINIT_CTOR)
>>>>    Non-static class member "m_pParentsBgBmp" is not initialized in this 
>>>> constructor nor in any functions that it calls.
> 342     CTransparentCheckBox::CTransparentCheckBox() {}
> 343
> 344     CTransparentCheckBox::CTransparentCheckBox(wxWindow *parent, 
> wxWindowID id, const wxString& label,
> 345                 const wxPoint& pos,
> 346                 const wxSize& size, long style,
> 347                 const wxValidator& validator,
> 
> ** CID 117636:  Insecure data handling  (TAINTED_SCALAR)
> /sched/size_regulator.cpp: 85 in main()
> 
> 
> ________________________________________________________________________________________________________
> *** CID 117636:  Insecure data handling  (TAINTED_SCALAR)
> /sched/size_regulator.cpp: 85 in main()
> 79                 hi = atoi(argv[++i]);
> 80             } else if (!strcmp(argv[i], "-d")) {
> 81                 log_messages.set_debug_level(atoi(argv[++i]));
> 82             } else if (!strcmp(argv[i], "--debug_leveld")) {
> 83                 log_messages.set_debug_level(atoi(argv[++i]));
> 84             } else if (!strcmp(argv[i], "--sleep_time")) {
>>>>    CID 117636:  Insecure data handling  (TAINTED_SCALAR)
>>>>    Assigning: "sleep_time" = "atoi", which taints "sleep_time".
> 85                 sleep_time = atoi(argv[++i]);
> 86             } else if (!strcmp(argv[i], "--random_order")) {
> 87                 order_clause = " order by random ";
> 88             } else if (!strcmp(argv[i], "--priority_asc")) {
> 89                 order_clause = " order by priority asc ";
> 90             } else if (!strcmp(argv[i], "--priority_order")) {
> 
> ** CID 117635:  Null pointer dereferences  (REVERSE_INULL)
> /client/cs_platforms.cpp: 123 in CLIENT_STATE::detect_platforms()()
> 
> 
> ________________________________________________________________________________________________________
> *** CID 117635:  Null pointer dereferences  (REVERSE_INULL)
> /client/cs_platforms.cpp: 123 in CLIENT_STATE::detect_platforms()()
> 117         // find the 'uname' executable
> 118         do {
> 119             if (boinc_file_exists(uname[eno])) break;
> 120         } while (uname[++eno] != 0);
> 121
> 122         // run it and check the kernel machine architecture.
>>>>    CID 117635:  Null pointer dereferences  (REVERSE_INULL)
>>>>    Null-checking "uname[eno]" suggests that it may be null, but it has 
>>>> already been dereferenced on all paths leading to the check.
> 123         if ( uname[eno] != 0 ) {
> 124             strlcpy(cmdline,uname[eno],256);
> 125             strlcat(cmdline," -m",256);
> 126             if ((f=popen(cmdline,"r"))) {
> 127                 while (!std::feof(f)) {
> 128                     if (!fgets(cmdline,256,f)) break;
> 
> ** CID 117634:  Null pointer dereferences  (REVERSE_INULL)
> /client/cs_platforms.cpp: 160 in CLIENT_STATE::detect_platforms()()
> 
> 
> ________________________________________________________________________________________________________
> *** CID 117634:  Null pointer dereferences  (REVERSE_INULL)
> /client/cs_platforms.cpp: 160 in CLIENT_STATE::detect_platforms()()
> 154                 eno=0;
> 155                 do {
> 156                     if (boinc_file_exists(file[eno])) break;
> 157                 } while (file[++eno] != 0);
> 158
> 159                 // now try to find a 32-bit C library.
>>>>    CID 117634:  Null pointer dereferences  (REVERSE_INULL)
>>>>    Null-checking "file[eno]" suggests that it may be null, but it has 
>>>> already been dereferenced on all paths leading to the check.
> 160                 if (file[eno] != 0) {
> 161                     int i;
> 162                     for (i=0; i < nlibdirs; i++) {
> 163                         struct dirent *entry;
> 164                         DIR *a = opendir(libdir[i]);
> 165                         // if dir doesn't exist, do the next one
> 
> ** CID 117633:  Null pointer dereferences  (REVERSE_INULL)
> /clientgui/AdvancedFrame.cpp: 1156 in 
> CAdvancedFrame::OnWizardAttachProject(wxCommandEvent &)()
> 
> 
> ________________________________________________________________________________________________________
> *** CID 117633:  Null pointer dereferences  (REVERSE_INULL)
> /clientgui/AdvancedFrame.cpp: 1156 in 
> CAdvancedFrame::OnWizardAttachProject(wxCommandEvent &)()
> 1150
> 1151             CWizardAttach* pWizard = new CWizardAttach(this);
> 1152
> 1153             wxString strURL = wxEmptyString;
> 1154             pWizard->Run(strURL, false);
> 1155
>>>>    CID 117633:  Null pointer dereferences  (REVERSE_INULL)
>>>>    Null-checking "pWizard" suggests that it may be null, but it has 
>>>> already been dereferenced on all paths leading to the check.
> 1156             if (pWizard) {
> 1157                 pWizard->Destroy();
> 1158             }
> 1159
> 1160             DeleteMenu();
> 1161             CreateMenu();
> 
> ** CID 117632:  Null pointer dereferences  (REVERSE_INULL)
> /clientgui/sg_BoincSimpleFrame.cpp: 706 in 
> CSimpleFrame::OnProjectsAttachToProject(wxCommandEvent &)()
> 
> 
> ________________________________________________________________________________________________________
> *** CID 117632:  Null pointer dereferences  (REVERSE_INULL)
> /clientgui/sg_BoincSimpleFrame.cpp: 706 in 
> CSimpleFrame::OnProjectsAttachToProject(wxCommandEvent &)()
> 700
> 701             CWizardAttach* pWizard = new CWizardAttach(this);
> 702
> 703             wxString strURL = wxEmptyString;
> 704             pWizard->Run(strURL, false);
> 705
>>>>    CID 117632:  Null pointer dereferences  (REVERSE_INULL)
>>>>    Null-checking "pWizard" suggests that it may be null, but it has 
>>>> already been dereferenced on all paths leading to the check.
> 706             if (pWizard)
> 707                 pWizard->Destroy();
> 708
> 709         } else {
> 710             ShowNotCurrentlyConnectedAlert();
> 711         }
> 
> ** CID 117631:  Null pointer dereferences  (NULL_RETURNS)
> /clientgui/sg_ProjectWebSitesPopup.cpp: 130 in 
> CSimpleProjectWebSitesPopupButton::OnMenuLinkClicked(wxCommandEvent &)()
> 
> 
> ________________________________________________________________________________________________________
> *** CID 117631:  Null pointer dereferences  (NULL_RETURNS)
> /clientgui/sg_ProjectWebSitesPopup.cpp: 130 in 
> CSimpleProjectWebSitesPopupButton::OnMenuLinkClicked(wxCommandEvent &)()
> 124
> 125          if (menuIDevt == WEBSITE_URL_MENU_ID_HOMEPAGE ) {
> 126              wxLaunchDefaultBrowser(wxString(ctrl_url, wxConvUTF8));
> 127          } else{
> 128              int menuId = menuIDevt - WEBSITE_URL_MENU_ID;
> 129              PROJECT* project = pDoc->state.lookup_project(ctrl_url);
>>>>    CID 117631:  Null pointer dereferences  (NULL_RETURNS)
>>>>    Dereferencing a pointer that might be null "project->gui_urls" when 
>>>> calling "operator []". [Note: The source code implementation of the 
>>>> function has been overridden by a builtin model.]
> 130              project->gui_urls[menuId].name.c_str();
> 131
> 132              
> wxLaunchDefaultBrowser(wxString(project->gui_urls[menuId].url.c_str(),wxConvUTF8));
> 133            }
> 
> ** CID 117630:  Null pointer dereferences  (NULL_RETURNS)
> /clientgui/sg_BoincSimpleFrame.cpp: 1089 in 
> CSimpleGUIPanel::OnProjectsAttachToProject(wxCommandEvent &)()
> 
> 
> ________________________________________________________________________________________________________
> *** CID 117630:  Null pointer dereferences  (NULL_RETURNS)
> /clientgui/sg_BoincSimpleFrame.cpp: 1089 in 
> CSimpleGUIPanel::OnProjectsAttachToProject(wxCommandEvent &)()
> 1083     }
> 1084
> 1085
> 1086     void CSimpleGUIPanel::OnProjectsAttachToProject(wxCommandEvent& 
> event) {
> 1087         wxLogTrace(wxT("Function Start/End"), 
> wxT("CSimpleGUIPanel::OnProjectsAttachToProject - Function Begin"));
> 1088          
>>>>    CID 117630:  Null pointer dereferences  (NULL_RETURNS)
>>>>    Assigning: "pFrame" = null return value from "wxCheckDynamicCast".
> 1089         CSimpleFrame* pFrame = wxDynamicCast(GetParent(), CSimpleFrame);
> 1090         wxASSERT(pFrame);
> 1091
> 1092         pFrame->OnProjectsAttachToProject(event);
> 1093
> 1094         wxLogTrace(wxT("Function Start/End"), 
> wxT("CSimpleFrame::OnProjectsAttachToProject - Function End"));
> 
> ** CID 117629:  Null pointer dereferences  (NULL_RETURNS)
> /clientgui/sg_ProjectPanel.cpp: 517 in 
> CSimpleProjectPanel::UpdateProjectList()()
> 
> 
> ________________________________________________________________________________________________________
> *** CID 117629:  Null pointer dereferences  (NULL_RETURNS)
> /clientgui/sg_ProjectPanel.cpp: 517 in 
> CSimpleProjectPanel::UpdateProjectList()()
> 511             // Check to see if we need to reload the project icon
> 512             ctrlCount = m_ProjectSelectionCtrl->GetCount();
> 513             for(j=0; j<ctrlCount; j++) {
> 514                 selData = 
> (ProjectSelectionData*)m_ProjectSelectionCtrl->GetClientData(j);
> 515                 ctrl_url = selData->project_url;
> 516                 project = pDoc->state.lookup_project(ctrl_url);
>>>>    CID 117629:  Null pointer dereferences  (NULL_RETURNS)
>>>>    Dereferencing a null pointer "project".
> 517                 if ( project->project_files_downloaded_time > 
> selData->project_files_downloaded_time ) {
> 518                     wxBitmap* projectBM = 
> GetProjectSpecificBitmap(ctrl_url);
> 519                     selData->project_files_downloaded_time = 
> project->project_files_downloaded_time;
> 520                     m_ProjectSelectionCtrl->SetItemBitmap(j, *projectBM);
> 521                 }
> 522             }
> 
> 
> ________________________________________________________________________________________________________
> To view the defects in Coverity Scan visit, 
> https://scan.coverity.com/projects/boinc-boinc?tab=overview
> 
> To manage Coverity Scan email notifications for "[email protected]", 
> click 
> https://scan.coverity.com/subscriptions/edit?email=davea%40ssl.berkeley.edu&token=23a67db0c16c6cf9e2c419515a6c586f
> 
> 
> 
> _______________________________________________
> boinc_dev mailing list
> [email protected]
> http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
> To unsubscribe, visit the above URL and
> (near bottom of page) enter your email address.
> 

_______________________________________________
boinc_dev mailing list
[email protected]
http://lists.ssl.berkeley.edu/mailman/listinfo/boinc_dev
To unsubscribe, visit the above URL and
(near bottom of page) enter your email address.

Reply via email to