mirror of
https://github.com/samba-team/samba.git
synced 2025-08-02 00:22:11 +03:00
Fixed O(N^2) talloc loop when allocating printer name memory - fix from
Richard Bollinger <rabollinger@home.com>.
Jeremy.
(This used to be commit 408c0595bb
)
This commit is contained in:
@ -3344,8 +3344,8 @@ int lp_servicenumber(char *pszServiceName)
|
||||
int iService;
|
||||
|
||||
for (iService = iNumServices - 1; iService >= 0; iService--)
|
||||
if (VALID(iService) &&
|
||||
strequal(lp_servicename(iService), pszServiceName))
|
||||
if (VALID(iService) && ServicePtrs[iService]->szService &&
|
||||
strequal(ServicePtrs[iService]->szService, pszServiceName))
|
||||
break;
|
||||
if (iService < 0)
|
||||
DEBUG(7,
|
||||
|
Reference in New Issue
Block a user