Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / security / arirang / patches / patch-aa
blobe8591e4032a2157989983591e87a3e519ab947f8
1 $NetBSD$
3 --- osfinger.c.orig     2002-07-21 02:49:32.000000000 -0400
4 +++ osfinger.c
5 @@ -33,6 +33,7 @@
6  #include <sys/socket.h>
7  #include <netinet/in.h>
8  #include <netdb.h>
9 +#include <arpa/inet.h>
10  #include <signal.h>
12  #include "arirang.h"
13 @@ -71,7 +72,14 @@ osdetect(char *scanhost)
14         }
15         snprintf(osfinger, sizeof(osfinger), "GET %s%s HTTP/1.0\n\n", NETCRAFT_FINGER, scanhost);
16         send(sock, osfinger, strlen(osfinger), 0);
17 -       recv(sock, headBuff, sizeof(headBuff), MSG_WAITALL);
19 +       {
20 +               int toRead = sizeof(headBuff);
21 +               int wasRead;
23 +               while ((wasRead = recv(sock, headBuff, toRead, 0)) > 0)
24 +                   toRead -= wasRead;
25 +       }
27         ptr = strstr(headBuff, "running <b>");