X-Git-Url: http://git.chise.org/gitweb/?a=blobdiff_plain;f=lib-src%2Fgnuserv.c;h=34b933b8dce526754332f712fe517ab8c6c6b648;hb=041e98cf4c48018877365e3bfb37cfc09b54cc6d;hp=2ba5785f666388b9eb82b9a16f266ada21b42e57;hpb=40402600969429d5253e62c6314a3eebbb21f027;p=chise%2Fxemacs-chise.git.1 diff --git a/lib-src/gnuserv.c b/lib-src/gnuserv.c index 2ba5785..34b933b 100644 --- a/lib-src/gnuserv.c +++ b/lib-src/gnuserv.c @@ -458,8 +458,6 @@ permitted (unsigned long host_addr, int fd) char auth_protocol[128]; char buf[1024]; int auth_data_len; - int auth_data_pos; - int auth_mismatches; if (fd > 0) { @@ -502,10 +500,11 @@ permitted (unsigned long host_addr, int fd) #ifdef AUTH_MAGIC_COOKIE if (server_xauth && server_xauth->data) - { + { /* Do a compare without comprising info about the size of the cookie */ - auth_mismatches = + int auth_data_pos; + int auth_mismatches = ( auth_data_len ^ server_xauth->data_length ); @@ -518,7 +517,7 @@ permitted (unsigned long host_addr, int fd) return TRUE; for(;rand() % 1000;); - } + } #else printf ("client tried Xauth, but server is not compiled with Xauth\n");