diff options
Diffstat (limited to 'ldap/servers/slapd/back-ldbm/vlv_srch.c')
-rw-r--r-- | ldap/servers/slapd/back-ldbm/vlv_srch.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/ldap/servers/slapd/back-ldbm/vlv_srch.c b/ldap/servers/slapd/back-ldbm/vlv_srch.c index 42012af1..e7d7d608 100644 --- a/ldap/servers/slapd/back-ldbm/vlv_srch.c +++ b/ldap/servers/slapd/back-ldbm/vlv_srch.c @@ -57,12 +57,14 @@ vlvSearch_new() static void trimspaces(char *s) { - PRUint32 i= strlen(s) - 1; - while(i > 0 && isascii(s[i]) && isspace(s[i])) - { - s[i]= '\0'; - i--; - } + if (s) { + PRUint32 i= strlen(s) - 1; + while(i > 0 && isascii(s[i]) && isspace(s[i])) + { + s[i]= '\0'; + i--; + } + } } /* |