diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2011-11-25 12:16:05 +0000 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2011-11-25 12:16:05 +0000 |
commit | 3bd2f17754009d84df1aeb60cfa1d3510182e87c (patch) | |
tree | 69d61c0a9b87e53349739eb6dea0fa5e0523d09b | |
parent | 693ff09ad6d6d5329ea8fad6eb4d1f594db70b67 (diff) |
msn_soap_debug_print may get called with NULL pointers. Pay attention.
-rw-r--r-- | protocols/msn/soap.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/protocols/msn/soap.c b/protocols/msn/soap.c index cbc384be..467429fb 100644 --- a/protocols/msn/soap.c +++ b/protocols/msn/soap.c @@ -214,12 +214,16 @@ static void msn_soap_debug_print( const char *headers, const char *payload ) if( !getenv( "BITLBEE_DEBUG" ) ) return; - if( ( s = strstr( headers, "\r\n\r\n" ) ) ) - st = write( 1, headers, s - headers + 4 ); - else - st = write( 1, headers, strlen( headers ) ); + if( headers ) + { + if( ( s = strstr( headers, "\r\n\r\n" ) ) ) + st = write( 1, headers, s - headers + 4 ); + else + st = write( 1, headers, strlen( headers ) ); + } #ifdef DEBUG + if( payload ) { struct xt_node *xt = xt_from_string( payload ); if( xt ) |