patch-libhttpd_ip_acl_c 838 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- wifidog-1.1.5.orig/libhttpd/ip_acl.c 2007-03-12 20:37:06.000000000 +0100
  3. +++ wifidog-1.1.5/libhttpd/ip_acl.c 2014-01-01 16:34:21.000000000 +0100
  4. @@ -44,30 +44,30 @@
  5. static int scanCidr(val, result, length)
  6. char *val;
  7. - u_int *result,
  8. + unsigned int *result,
  9. *length;
  10. {
  11. - u_int res, res1, res2, res3, res4, res5;
  12. + unsigned int res, res1, res2, res3, res4, res5;
  13. char *cp;
  14. cp = val;
  15. res1 = atoi(cp);
  16. - cp = index(cp,'.');
  17. + cp = strchr(cp,'.');
  18. if (!cp)
  19. return(-1);
  20. cp++;
  21. res2 = atoi(cp);
  22. - cp = index(cp,'.');
  23. + cp = strchr(cp,'.');
  24. if (!cp)
  25. return(-1);
  26. cp++;
  27. res3 = atoi(cp);
  28. - cp = index(cp,'.');
  29. + cp = strchr(cp,'.');
  30. if (!cp)
  31. return(-1);
  32. cp++;
  33. res4 = atoi(cp);
  34. - cp = index(cp,'/');
  35. + cp = strchr(cp,'/');
  36. if (!cp)
  37. {
  38. res5 = 32;