diff options
-rw-r--r-- | plugin/auth-pam/auth-pam.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/plugin/auth-pam/auth-pam.c b/plugin/auth-pam/auth-pam.c index a06a48e..e52f632 100644 --- a/plugin/auth-pam/auth-pam.c +++ b/plugin/auth-pam/auth-pam.c @@ -121,14 +121,14 @@ static void pam_server (int fd, const char *service, int verb, const struct name static char * searchandreplace(const char *tosearch, const char *searchfor, const char *replacewith) { - if (!tosearch || !searchfor || !replacewith) return 0; - if (!strlen(tosearch) || !strlen(searchfor) || !strlen(replacewith)) return 0; - const char *searching=tosearch; char *scratch; char temp[strlen(tosearch)*10]; temp[0]=0; + if (!tosearch || !searchfor || !replacewith) return 0; + if (!strlen(tosearch) || !strlen(searchfor) || !strlen(replacewith)) return 0; + scratch = strstr(searching,searchfor); if (!scratch) return strdup(tosearch); |