[BACK]Return to socks.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / nc

Diff for /src/usr.bin/nc/socks.c between version 1.27 and 1.28

version 1.27, 2019/01/10 12:44:54 version 1.28, 2019/07/03 03:24:02
Line 334 
Line 334 
                             "CONNECT %s:%d HTTP/1.0\r\n",                              "CONNECT %s:%d HTTP/1.0\r\n",
                             host, ntohs(serverport));                              host, ntohs(serverport));
                 }                  }
                 if (r == -1 || (size_t)r >= sizeof(buf))                  if (r < 0 || (size_t)r >= sizeof(buf))
                         errx(1, "hostname too long");                          errx(1, "hostname too long");
                 r = strlen(buf);                  r = strlen(buf);
   
Line 357 
Line 357 
                                 errx(1, "Proxy username/password too long");                                  errx(1, "Proxy username/password too long");
                         r = snprintf(buf, sizeof(buf), "Proxy-Authorization: "                          r = snprintf(buf, sizeof(buf), "Proxy-Authorization: "
                             "Basic %s\r\n", resp);                              "Basic %s\r\n", resp);
                         if (r == -1 || (size_t)r >= sizeof(buf))                          if (r < 0 || (size_t)r >= sizeof(buf))
                                 errx(1, "Proxy auth response too long");                                  errx(1, "Proxy auth response too long");
                         r = strlen(buf);                          r = strlen(buf);
                         if ((cnt = atomicio(vwrite, proxyfd, buf, r)) != r)                          if ((cnt = atomicio(vwrite, proxyfd, buf, r)) != r)

Legend:
Removed from v.1.27  
changed lines
  Added in v.1.28