summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--opentracker.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/opentracker.c b/opentracker.c
index 051a67c..e375f72 100644
--- a/opentracker.c
+++ b/opentracker.c
@@ -226,8 +226,11 @@ static void httpresponse( const int64 s, char *data, size_t l ) {
226 size_t reply_size = 0, reply_off; 226 size_t reply_size = 0, reply_off;
227 227
228#ifdef _DEBUG_HTTPERROR 228#ifdef _DEBUG_HTTPERROR
229 memcpy( debug_request, data, l ); 229 memcpy( debug_request, data, sizeof( debug_request ) );
230 data[l] = 0; 230 if( l < sizeof( debug_request ) )
231 debug_request[ l ] = 0;
232 else
233 debug_request[ sizeof( debug_request ) - 1 ] = 0;
231#endif 234#endif
232 235
233 /* This one implicitely tests strlen < 5, too -- remember, it is \n terminated */ 236 /* This one implicitely tests strlen < 5, too -- remember, it is \n terminated */