Add Q.932 to extra dist.
[obnox/wireshark/wip.git] / epan / sigcomp_state_hdlr.c
index 78f168fcd01dcada7d6ae1df15131462fe9cbef4..26e01f4e10434dc41151e437b8581f906292e63c 100644 (file)
@@ -5,8 +5,8 @@
  *
  * $Id$
  *
- * Ethereal - Network traffic analyzer
- * By Gerald Combs <gerald@ethereal.com>
+ * Wireshark - Network traffic analyzer
+ * By Gerald Combs <gerald@wireshark.org>
  * Copyright 1998 Gerald Combs
  *
  * This program is free software; you can redistribute it and/or
@@ -435,7 +435,7 @@ int udvm_state_access(tvbuff_t *tvb, proto_tree *tree,guint8 *buff,guint16 p_id_
                                           gint hf_id)
 {
        int                     result_code = 0;
-       guint16         n;
+       guint32         n;
        guint16         k;
        guint16         byte_copy_right;
        guint16         byte_copy_left;
@@ -457,7 +457,7 @@ int udvm_state_access(tvbuff_t *tvb, proto_tree *tree,guint8 *buff,guint16 p_id_
         * state handler.
         */
 
-       if (( p_id_length < 6 ) || ( p_id_length > 20 )){
+       if (( p_id_length < STATE_MIN_ACCESS_LEN ) || ( p_id_length > STATE_BUFFER_SIZE )){
                result_code = 1;
                return result_code;
        }
@@ -546,7 +546,7 @@ int udvm_state_access(tvbuff_t *tvb, proto_tree *tree,guint8 *buff,guint16 p_id_
        /* debug 
         *g_warning(" state_begin %u state_address %u",state_begin , *state_address);
         */
-       while ( n < (state_begin + *state_length + 8) && n < UDVM_MEMORY_SIZE ){
+       while ( (gint32) n < (state_begin + *state_length + 8) && n < UDVM_MEMORY_SIZE ){
                buff[k] = state_buff[n];
                /*  debug 
                 g_warning(" Loading 0x%x at address %u",buff[k] , k);