remove only reference to strndup
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11202 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -587,9 +587,11 @@ match_local_auth (Xauth* auth,
|
|||||||
char *tmp_disp;
|
char *tmp_disp;
|
||||||
struct addrinfo *a;
|
struct addrinfo *a;
|
||||||
|
|
||||||
tmp_disp = strndup (auth->number, auth->number_length);
|
tmp_disp = malloc(auth->number_length + 1);
|
||||||
if (tmp_disp == NULL)
|
if (tmp_disp == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
memcpy(tmp_disp, auth->number, auth->number_length);
|
||||||
|
tmp_disp[auth->number_length] = '\0';
|
||||||
auth_disp = atoi(tmp_disp);
|
auth_disp = atoi(tmp_disp);
|
||||||
free (tmp_disp);
|
free (tmp_disp);
|
||||||
if (auth_disp != disp_nr)
|
if (auth_disp != disp_nr)
|
||||||
|
Reference in New Issue
Block a user