httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 33803] New: - 2 Minor Bugs in Apache Service Monitor
Date Wed, 02 Mar 2005 11:50:42 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33803>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=33803

           Summary: 2 Minor Bugs in Apache Service Monitor
           Product: Apache httpd-2.0
           Version: 2.0.53
          Platform: PC
        OS/Version: Windows 2000
            Status: NEW
          Keywords: PatchAvailable
          Severity: normal
          Priority: P2
         Component: support
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: drax@sawebs.com


"am_DisconnectComputer()" uses wrong index-variable in loop

changes/fix see //!!!

void am_DisconnectComputer(LPSTR szComputerName)
{
    int i = 0, j;
    while (g_stComputers[i].szComputerName != NULL) {
        if (strcmp(g_stComputers[i].szComputerName, szComputerName) == 0) {
            break;
        }
        ++i;
    }
    if (g_stComputers[i].szComputerName != NULL) {
        free(g_stComputers[i].szComputerName);
        RegCloseKey(g_stComputers[i].hRegistry);
        for (j = i; j < MAX_PROVIS_COMPUTERS - 1; j++) {
//!!! was:
//!!!    g_stComputers[i].szComputerName= g_stComputers[i+1].szComputerName;
//!!!    g_stComputers[i].hRegistry = g_stComputers[i+1].hRegistry;
//!!! should read:
            g_stComputers[j].szComputerName= g_stComputers[j+1].szComputerName;
            g_stComputers[j].hRegistry = g_stComputers[j+1].hRegistry;
        }
        for (i = j; i < MAX_PROVIS_COMPUTERS; i++) {
            g_stComputers[i].szComputerName = NULL;
            g_stComputers[i].hRegistry = NULL;
        }
    } 
}

2nd:
GetApacheServicesStatus()
shouldn't it read: ?!

	}
	++computers;
	RegCloseKey(hKey); //!!! original position of 
                           //!!! RegCloseKey(hKey) causes a handle leak
  }    
FindRunningServices();
return TRUE;

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message