* Routines for Microsoft Proxy packet dissection
* Copyright 2000, Jeffrey C. Foster <jfoste@woodward.com>
*
- * $Id: packet-msproxy.c,v 1.16 2001/01/09 06:31:38 guy Exp $
+ * $Id: packet-msproxy.c,v 1.17 2001/03/22 06:55:58 guy Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
/* NOTE: this routine assumes that the tree pointer is valid (not NULL) */
- char temp[255];
+ char temp[255+1];
if (!IS_DATA_IN_FRAME(offset)){
proto_tree_add_text(tree, NullTVB, offset, 0, "****FRAME TOO SHORT***");
/* decode the user, application, computer name */
- char str[ 255];
+ char str[ 255+1];
if ( tree) {
+ CHECK_PACKET_LENGTH(1);
strncpy( str, &pd[ offset], MIN( 255, END_OF_FRAME));
str[ MIN( 255, END_OF_FRAME)] = 0;
"User name: %s", str);
offset += strlen( str) + 2;
+ CHECK_PACKET_LENGTH(1);
strncpy( str, &pd[ offset], MIN( 255, END_OF_FRAME));
str[ MIN( 255, END_OF_FRAME)] = 0;
"Application name: %s", str);
offset += strlen( str) + 1;
+ CHECK_PACKET_LENGTH(1);
strncpy( str, &pd[ offset], MIN( 255, END_OF_FRAME));
str[ MIN( 255, END_OF_FRAME)] = 0;
/* decode the authorization request */
- char temp[255];
+ char temp[255+1];
if ( tree) {
offset += 134;
+ CHECK_PACKET_LENGTH(7);
strncpy( temp, &pd[ offset], 7);
temp[ 7] = 0;
proto_tree_add_text( tree, NullTVB, offset, 7, "NTLMSSP signature: %s",
proto_tree *name_tree;
proto_item *ti;
- char temp[ 256];
+ char temp[ 255+1];
int length = GBYTE( pd, offset);
if ( tree){
+ CHECK_PACKET_LENGTH(length);
strncpy( temp, &pd[ offset + 18], length);
temp[ length ] = 0;
proto_tree *tree, hash_entry_t *conv_info) {
int cmd;
- char temp[ 255];
+ char temp[ 255+1];
if ( tree) {
CHECK_PACKET_LENGTH( 4);
static void dissect_auth_1_ack(const u_char *pd, int offset, frame_data *fd, proto_tree *tree) {
- char temp[ 255];
+ char temp[ 255+1];
offset += 134;
if ( tree) {
/* return the length of the string and the length byte */
if ( tree) {
+ int addr_offset;
- int addr_offset = GBYTE( pd, offset);
+ CHECK_PACKET_LENGTH(1);
+ addr_offset = GBYTE( pd, offset);
proto_tree_add_text( tree, NullTVB, offset, 1, "Address offset: %d",
addr_offset);
static void dissect_msproxy_response(const u_char *pd, int offset, frame_data *fd, proto_tree *tree, hash_entry_t *conv_info) {
- char temp[ 255];
+ char temp[ 255+1];
int cmd;