patch-HttpHandler.cpp 374 B

1234567891011
  1. --- ./HttpHandler.cpp.orig 2008-08-23 04:00:12.000000000 -0700
  2. +++ ./HttpHandler.cpp 2011-12-30 17:37:16.000000000 -0800
  3. @@ -427,7 +427,7 @@
  4. void HttpHandler::putline(const string& line)
  5. {
  6. - sprintf(buffer, "%s\r\n", line.c_str());
  7. + snprintf(buffer, BUFSIZ + 1, "%s\r\n", line.c_str());
  8. #ifndef _OpenSSL_
  9. if (send(http, buffer, strlen(buffer), 0) == SOCKET_ERROR)