diff options
author | Jeremy Allison <jra@samba.org> | 2001-09-06 15:48:29 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-09-06 15:48:29 +0000 |
commit | 408c0595bbeafca87795e5278656471fbe0540e8 (patch) | |
tree | 3639aeb2446b82b902364c6b51a7602b3f77c3a4 /source | |
parent | 9341e5534d0786e6ad7980e5fd1a0b35d77a2806 (diff) | |
download | samba-408c0595bbeafca87795e5278656471fbe0540e8.tar.gz samba-408c0595bbeafca87795e5278656471fbe0540e8.tar.xz samba-408c0595bbeafca87795e5278656471fbe0540e8.zip |
Fixed O(N^2) talloc loop when allocating printer name memory - fix from
Richard Bollinger <rabollinger@home.com>.
Jeremy.
Diffstat (limited to 'source')
-rw-r--r-- | source/param/loadparm.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/param/loadparm.c b/source/param/loadparm.c index 98bb5abd09d..95ba0769776 100644 --- a/source/param/loadparm.c +++ b/source/param/loadparm.c @@ -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, |