m_pass.c fixed
This commit is contained in:
parent
54ac8b60a1
commit
97b41ffab9
2 changed files with 1 additions and 7 deletions
|
@ -99,12 +99,6 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
|
|||
size_t strlcat(char *dst, const char *src, size_t siz);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_STRNDUP
|
||||
#define DupNString(x, y, len) do { x = strndup(y, len); if(x == NULL) outofmemory(); } while (0)
|
||||
#else
|
||||
#define DupNString(x, y, len) do { x = malloc(len+1); if(x == NULL) outofmemory(); strlcpy(x, y, len+1); } while(0)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* clean_string - cleanup control and high ascii characters
|
||||
* -Dianora
|
||||
|
|
|
@ -67,7 +67,7 @@ mr_pass(struct Client *client_p, struct Client *source_p, int parc, const char *
|
|||
rb_free(client_p->localClient->passwd);
|
||||
}
|
||||
|
||||
DupNString(client_p->localClient->passwd, parv[1], PASSWDLEN);
|
||||
client_p->localClient->passwd = rb_strndup(parv[1], PASSWDLEN);
|
||||
|
||||
/* These are for servers only */
|
||||
if(parc > 2 && client_p->user == NULL)
|
||||
|
|
Loading…
Reference in a new issue