1
0
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:
Jeremy Allison
2001-09-06 15:48:29 +00:00
parent fc07eb5eef
commit a92f02a0a0

View File

@ -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,