summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorerdgeist <>2007-10-19 22:55:13 +0000
committererdgeist <>2007-10-19 22:55:13 +0000
commit84f8738b822b5e99f0757321c56bea948ac7e511 (patch)
tree6fb9a88e2d68fe7a4e11f17b88eb64e177baac74
parentd768bf6e818c963a21b82003d1d7cc5351c0a01b (diff)
Fix debug output
-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 */