Comment # 2
on bug 8841
from hustpigeon
static guint32
dissect_per_normally_small_nonnegative_whole_number(tvbuff_t *tvb, guint32
offset, asn1_ctx_t *actx, proto_tree *tree, int hf_index, guint32 *length)
{
(1)---> if(!small_number)//
{
offset=dissect_per_boolean(tvb, offset, actx, tree, -1,
*length<<=1;
if (length_bit)
{
(2)------> *length|=1;--->it is value not length
}
}
/* 10.6.2 */
(3)------> offset=dissect_per_length_determinant( "..." ,hf_index,
length -->it is length not
value)
return offset;
}
/////////////////////////////////////
look above (1),if small_number if true,what we will get? we get *length is the
value of a "normally small nonnegative whole number" at (2). this is right!
here *length is value of a whole number,for example, a
small_nonnegative_whole_number is 55,*length is 55(value not length)
but, if "bool small_number" is not true, we get at (3)
dissect_per_length_determinant,this function pass out "length",here *length is
the length of "normally small nonnegative whole number",is not the value of
"normally small nonnegative whole number".
so if small_nonnegative_whole_number is 55,*length is 1(length not value), not
55.
example 2: if small_nonnegative_whole_number is 0x1122,*length is 2(length not
value), not 0x1122
in a word, param "length" is confilict when "bool small_number" is true or
fale, one pass out whole number'length,and one pass out whome number's value.
You are receiving this mail because:
- You are watching all bug changes.