1
0

patch-libhttpd_protocol_c 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. $Id: update-patches 24 2008-08-31 14:56:13Z wbx $
  2. --- wifidog-1.1.5.orig/libhttpd/protocol.c 2007-11-01 21:04:20.000000000 +0100
  3. +++ wifidog-1.1.5/libhttpd/protocol.c 2008-10-16 13:12:58.000000000 +0200
  4. @@ -83,7 +83,7 @@ int _httpd_readChar(request *r, char *cp
  5. {
  6. if (r->readBufRemain == 0)
  7. {
  8. - bzero(r->readBuf, HTTP_READ_BUF_LEN + 1);
  9. + memset(r->readBuf, 0, HTTP_READ_BUF_LEN + 1);
  10. r->readBufRemain = _httpd_net_read(r->clientSock,
  11. r->readBuf, HTTP_READ_BUF_LEN);
  12. if (r->readBufRemain < 1)
  13. @@ -352,7 +352,7 @@ void _httpd_storeData(request *r, char *
  14. cp = query;
  15. cp2 = var;
  16. - bzero(var, strlen(query));
  17. + memset(var, 0, strlen(query));
  18. val = NULL;
  19. while(*cp)
  20. {
  21. @@ -483,7 +483,7 @@ httpDir *_httpd_findContentDir(server, d
  22. if (createFlag == HTTP_TRUE)
  23. {
  24. curChild = malloc(sizeof(httpDir));
  25. - bzero(curChild, sizeof(httpDir));
  26. + memset(curChild, 0, sizeof(httpDir));
  27. curChild->name = strdup(curDir);
  28. curChild->next = curItem->children;
  29. curItem->children = curChild;
  30. @@ -606,7 +606,7 @@ void _httpd_sendFile(httpd *server, requ
  31. char *suffix;
  32. struct stat sbuf;
  33. - suffix = rindex(path, '.');
  34. + suffix = strrchr(path, '.');
  35. if (suffix != NULL)
  36. {
  37. if (strcasecmp(suffix,".gif") == 0)
  38. @@ -699,7 +699,7 @@ char *_httpd_escape(str)
  39. if (!ACCEPTABLE((unsigned char)*p))
  40. unacceptable +=2;
  41. result = (char *) malloc(p-str + unacceptable + 1);
  42. - bzero(result,(p-str + unacceptable + 1));
  43. + memset(result, 0, (p-str + unacceptable + 1));
  44. if (result == NULL)
  45. {