Fix the infinite-loop fuzz failure reported in

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6949 :

Don't use a guint8 for() loop index when the end of the loop value is stored
in a guint: the loop index may never reach the end-of-loop value.

Also remove a shadow'd variable.

svn path=/trunk/; revision=41625
This commit is contained in:
Jeff Morriss 2012-03-17 02:41:02 +00:00
parent c604cb5fa9
commit 5f555e2821
1 changed files with 20 additions and 20 deletions

View File

@ -680,7 +680,6 @@ decode_ip_device_routing(proto_tree *tree _U_,
{
case 0x00: /* Update Mode */
{
int i;
static const value_string str_update_mode[] = {
{0x00, "NOE Update Mode"},
{0x01, "Bootloader"},
@ -2220,7 +2219,8 @@ decode_lcd_line_cmd(proto_tree *tree _U_,
proto_item *ua3g_item,
proto_item *ua3g_body_item)
{
guint8 i, lcd_options, command, column_n;
guint8 lcd_options, command, column_n;
guint i;
proto_tree *ua3g_body_tree;
proto_item *ua3g_param_item;
proto_tree *ua3g_param_tree;