dcerpc: Check dissect_ndr_ucvarray_core when looping over elements that we're incrementing offset.

Bug: 12720
Change-Id: Ib9c9eb2e60c35b23b4c6b4898b036bcdc442fc84
Reviewed-on: https://code.wireshark.org/review/17041
Petri-Dish: Michael Mann <mmann78@netscape.net>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Michael Mann <mmann78@netscape.net>
This commit is contained in:
Michael Mann 2016-08-13 20:41:55 -04:00
parent c0f24bdf6c
commit 7c66a6b8dc
1 changed files with 4 additions and 0 deletions

View File

@ -2414,7 +2414,11 @@ dissect_ndr_ucvarray_core(tvbuff_t *tvb, gint offset, packet_info *pinfo,
pinfo, tree, di, drep);
} else if (fnct_bytes) {
for (i=0 ;i<di->array_actual_count; i++) {
old_offset = offset;
offset = (*fnct_bytes)(tvb, offset, pinfo, tree, di, drep);
/* Make sure we're moving forward */
if (old_offset >= offset)
break;
}
}
}