Catch an infinite loop. Fixes bug 1172.

svn path=/trunk/; revision=19640
This commit is contained in:
Gerald Combs 2006-10-20 19:37:11 +00:00
parent fcd6675b74
commit df360ddc8c
1 changed files with 15 additions and 12 deletions

View File

@ -1210,7 +1210,10 @@ dissect_ndr_ucvarray(tvbuff_t *tvb, gint offset, packet_info *pinfo,
/* real run, dissect the elements */ /* real run, dissect the elements */
for(i=0;i<di->array_actual_count;i++){ for(i=0;i<di->array_actual_count;i++){
old_offset = offset;
offset = (*fnct)(tvb, offset, pinfo, tree, drep); offset = (*fnct)(tvb, offset, pinfo, tree, drep);
if (offset <= old_offset)
THROW(ReportedBoundsError);
} }
} }