diff options
author | erdgeist <> | 2007-10-19 22:55:13 +0000 |
---|---|---|
committer | erdgeist <> | 2007-10-19 22:55:13 +0000 |
commit | 84f8738b822b5e99f0757321c56bea948ac7e511 (patch) | |
tree | 6fb9a88e2d68fe7a4e11f17b88eb64e177baac74 /opentracker.c | |
parent | d768bf6e818c963a21b82003d1d7cc5351c0a01b (diff) |
Fix debug output
Diffstat (limited to 'opentracker.c')
-rw-r--r-- | opentracker.c | 7 |
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 */ |