Catch an infinite loop.
authorGerald Combs <gerald@wireshark.org>
Thu, 6 Jul 2006 16:47:50 +0000 (16:47 -0000)
committerGerald Combs <gerald@wireshark.org>
Thu, 6 Jul 2006 16:47:50 +0000 (16:47 -0000)
svn path=/trunk/; revision=18672

epan/dissectors/packet-ber.c

index 0253da496e4592542c3e949a79cb993f887c678e..138556cae85d91112e2685db716931bc709f1855 100644 (file)
@@ -1068,6 +1068,7 @@ printf("SEQUENCE dissect_ber_sequence(%s) entered\n",name);
                offset = get_ber_identifier(tvb, offset, &class, &pc, &tag);
                offset = get_ber_length(tree, tvb, offset, &len, &ind_field);
                eoffset = offset + len;
+               DISSECTOR_ASSERT(eoffset > offset);
 
                if(ind_field && (len == 2)){
                        /* disgusting indefinite length zero length field, what are these people doing */