fix for bug 1079

verify that stat_info->request_uri is non null before doing string manipulations on it
so that we dont try to dereference a null pointer further down the code


svn path=/trunk/; revision=19153
This commit is contained in:
Ronnie Sahlberg 2006-09-05 14:32:15 +00:00
parent db31d4a72f
commit 52c827f1d1
1 changed files with 2 additions and 2 deletions

View File

@ -1415,8 +1415,8 @@ http_payload_subdissector(tvbuff_t *next_tvb, proto_tree *tree, proto_tree *sub_
gchar **strings; /* An array for spitting the request URI into hostname and port */
/* Response code 200 means "OK" and strncmp() == 0 means the strings match exactly */
if(stat_info->request_method != NULL && stat_info->response_code == 200 &&
strncmp(stat_info->request_method, "CONNECT", 7) == 0) {
if(stat_info->request_uri && stat_info->response_code == 200 &&
stat_info->request_method && strncmp(stat_info->request_method, "CONNECT", 7) == 0) {
/* Call a subdissector to handle HTTP CONNECT's traffic */
tcpd=get_tcp_conversation_data(pinfo);