X-Git-Url: http://git.marmaro.de/?a=blobdiff_plain;f=sbr%2Fruserpass.c;h=36605bea07c5fce3e15ec5d4379bb7370a94e4f1;hb=7edb0cbc236244d996d1e2ae1d58d0e9f7d98062;hp=4c12b712ce023dba2a0a924b7b027a48e7674479;hpb=4885712264980e6cbc2039f9158027bee9213475;p=mmh diff --git a/sbr/ruserpass.c b/sbr/ruserpass.c index 4c12b71..36605be 100644 --- a/sbr/ruserpass.c +++ b/sbr/ruserpass.c @@ -19,6 +19,7 @@ */ #include +#include #include #include @@ -91,7 +92,7 @@ ruserpass(char *host, char **aname, char **apass) /* * Allow match either for user's host name. */ - if (strcasecmp(host, tokval) == 0) + if (mh_strcasecmp(host, tokval) == 0) goto match; continue; } @@ -100,7 +101,7 @@ match: switch(t) { case LOGIN: if (token() && *aname == 0) { - *aname = malloc((size_t) strlen(tokval) + 1); + *aname = mh_xmalloc((size_t) strlen(tokval) + 1); strcpy(*aname, tokval); } break; @@ -112,7 +113,7 @@ match: goto bad; } if (token() && *apass == 0) { - *apass = malloc((size_t) strlen(tokval) + 1); + *apass = mh_xmalloc((size_t) strlen(tokval) + 1); strcpy(*apass, tokval); } break; @@ -153,7 +154,7 @@ done: myname = tmp; } - *aname = malloc((size_t) strlen(myname) + 1); + *aname = mh_xmalloc((size_t) strlen(myname) + 1); strcpy (*aname, myname); } @@ -168,7 +169,7 @@ done: mypass = *aname; } - *apass = malloc((size_t) strlen(mypass) + 1); + *apass = mh_xmalloc((size_t) strlen(mypass) + 1); strcpy (*apass, mypass); }