$OpenBSD: patch-happyhttp_cpp,v 1.1.1.1 2009/01/28 10:12:35 sthen Exp $
--- happyhttp.cpp.orig	Thu Aug 28 11:08:27 2008
+++ happyhttp.cpp	Tue Jan 27 13:47:09 2009
@@ -357,7 +357,7 @@ void Connection::putrequest( const char* method, const
 	m_State = REQ_STARTED;
 
 	char req[ 512 ];
-	sprintf( req, "%s %s HTTP/1.1", method, url );
+	snprintf( req, 512, "%s %s HTTP/1.1", method, url );
 	m_Buffer.push_back( req );
 
 	putheader( "Host", m_Host.c_str() );	// required for HTTP1.1
@@ -381,7 +381,7 @@ void Connection::putheader( const char* header, const 
 void Connection::putheader( const char* header, int numericvalue )
 {
 	char buf[32];
-	sprintf( buf, "%d", numericvalue );
+	snprintf( buf, 32, "%d", numericvalue );
 	putheader( header, buf );
 }
 
