From 15b388ce51cafcf09301fe6d8a50922a3b9b43d1 Mon Sep 17 00:00:00 2001 From: Kai Blin Date: Sat, 15 Dec 2007 23:15:18 +0100 Subject: [PATCH] r26465: ntlm_auth: Remoce pstring. --- source/utils/ntlm_auth.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/source/utils/ntlm_auth.c b/source/utils/ntlm_auth.c index b224689d7073..3144fe91b103 100644 --- a/source/utils/ntlm_auth.c +++ b/source/utils/ntlm_auth.c @@ -339,16 +339,25 @@ static const char *get_password(struct cli_credentials *credentials) **/ static bool in_list(const char *s, const char *list, bool casesensitive) { - pstring tok; + char *tok; + size_t tok_len = 1024; const char *p=list; if (!list) return false; - while (next_token(&p, tok, LIST_SEP, sizeof(tok))) { - if ((casesensitive?strcmp:strcasecmp_m)(tok,s) == 0) + tok = (char *)malloc(tok_len); + if (!tok) { + return false; + } + + while (next_token(&p, tok, LIST_SEP, tok_len)) { + if ((casesensitive?strcmp:strcasecmp_m)(tok,s) == 0) { + free(tok); return true; + } } + free(tok); return false; } -- 2.34.1