diff options
author | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-05-26 21:46:07 +0000 |
---|---|---|
committer | Gilbert Ramirez <gram@alumni.rice.edu> | 1999-05-26 21:46:07 +0000 |
commit | 5f99945363948f02c0e7cf6edcf6d829d72fd9c7 (patch) | |
tree | a41f8bf2c883ccde058283b040a9240040b5a68e /packet-ncp.c | |
parent | fac51faa8a7dc0caf09013b1a411809359865ac7 (diff) | |
download | wireshark-5f99945363948f02c0e7cf6edcf6d829d72fd9c7.tar.gz wireshark-5f99945363948f02c0e7cf6edcf6d829d72fd9c7.tar.bz2 wireshark-5f99945363948f02c0e7cf6edcf6d829d72fd9c7.zip |
Removed segfault if NCP completion code was decoded for an uknown NCP reply type.
svn path=/trunk/; revision=296
Diffstat (limited to 'packet-ncp.c')
-rw-r--r-- | packet-ncp.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/packet-ncp.c b/packet-ncp.c index 4e620ccbe9..ebca85db9b 100644 --- a/packet-ncp.c +++ b/packet-ncp.c @@ -2,7 +2,7 @@ * Routines for NetWare Core Protocol * Gilbert Ramirez <gram@verdict.uthscsa.edu> * - * $Id: packet-ncp.c,v 1.14 1999/05/16 05:12:11 gram Exp $ + * $Id: packet-ncp.c,v 1.15 1999/05/26 21:46:07 gram Exp $ * * Ethereal - Network traffic analyzer * By Gerald Combs <gerald@unicom.net> @@ -595,9 +595,16 @@ dissect_ncp_reply(const u_char *pd, int offset, frame_data *fd, if (ncp_tree) { /* A completion code of 0 always means OK. Other values have different * meanings */ - proto_tree_add_item(ncp_tree, offset+6, 1, - "Completion Code: 0x%02x (%s)", reply.completion_code, - ncp_completion_code(reply.completion_code, ncp_request->family)); + if (ncp_request) { + proto_tree_add_item(ncp_tree, offset+6, 1, + "Completion Code: 0x%02x (%s)", reply.completion_code, + ncp_completion_code(reply.completion_code, ncp_request->family)); + } + else { + proto_tree_add_item(ncp_tree, offset+6, 1, + "Completion Code: 0x%02x (%s)", reply.completion_code, + reply.completion_code == 0 ? "OK" : "Unknown"); + } proto_tree_add_item(ncp_tree, offset+7, 1, "Connection Status: %d", reply.connection_state); |