Re: H.225/ASN1 problem

Cvetan Ivanov <[email protected]>
Newsgroups gmane.network.ethereal.devel
Message-ID <[email protected]>

Kukosa, Tomas wrote:
> You are right, I have found it too.
>  
> It will be fixed ASAP.

10x

while we are at it I found another issue with val_start in packet-ber


line 1528:


if (is_per_byte_aligned){
	BYTE_ALIGN_OFFSET(offset);
	offset+=length*8;
	val_start = offset>>3;

this leaves val_start pointing to the next element and breaks things badly.

If I exchange the 2 lines, the fast start dissector works fine again ;)


the patch looks like this:


@@ -1526,8 +1527,8 @@
                         /* align to byte */
                         if (is_per_byte_aligned){
                                 BYTE_ALIGN_OFFSET(offset);
+                               val_start = offset>>3;
                                 offset+=length*8;
-                               val_start = offset>>3;
                         }else{
                                 guint8 *buff;
                                 guint32 i = 0;



Best regards,

Cvetan

>  
> 
> ________________________________
> 
> Od: [email protected] za uživatele Cvetan Ivanov
> Odesláno: pá 2.6.2006 17:32
> Komu: Ethereal development
> Předmět: Re: [Ethereal-dev] H.225/ASN1 problem
> 
> 
> 
> Hello,
> 
> The problem seems to be in the per decoder, probably
> dissect_per_octet_string
> 
> in the case
>          } else if ((min_len==max_len)&&(min_len<65536)) {  /* 16.7 if
> length is fixed and less than to 64k*/
> ...
>                  if (is_per_byte_aligned){
>                          BYTE_ALIGN_OFFSET(offset);
> 
> val_start is not updated, and if the offset was not aligned from the
> start, val_start points to the previous byte
> 
>                  if (is_per_byte_aligned){
>                          BYTE_ALIGN_OFFSET(offset);
> +                       val_start = offset>>3;
>                          val_length = min_len;
>                          offset+=min_len*8;
> 
> seems to fix it, but it would be better if somewone with deeper knolwdge
> about packet-ber takes a look at it
> 
> btw it would be nice to replace "per_aligment_type_callback" with
> "per_alignment_type_callback" in the sources
> 
> 
> Cvetan Ivanov wrote:
>> Hello,
>>
>> While trying few captures with the current svn, I noticed that ip
>> addresses and GUIDs are decoded incorrectly.
>>
>> example:
>>
>> we have source signall address element that looks like this:
>>
>> 00 01 02 03 04 05 06
>>
>> where 0 means ipAddress and the IP should be 1.2.3.4 port 0x0506
>> but it's decoded instead as 0.1.2.3 port 0x0506
>>
>> the same thing goes for the CallIdentifier -
>>
>> 00 01 02 .... (17 bytes) is decoded like guid 000102..., and it should
>> be 010203...
>>
>> Tested on two different linux systems. Unfortunatrly I'm not too much
>> into asn1 and don't have idea how to debug this further.
> 
> 
> best regards,
> 
> Cvetan
> 
> 
> --
> Cvetan Ivanov
> System Administrator
> SpectrumNet Jsc.
> +35929657613 Office
> _______________________________________________
> Ethereal-dev mailing list
> [email protected]
> http://www.ethereal.com/mailman/listinfo/ethereal-dev
> 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Ethereal-dev mailing list
> [email protected]
> http://www.ethereal.com/mailman/listinfo/ethereal-dev

-- 
Cvetan Ivanov
System Administrator
SpectrumNet Jsc.
+35929657613 Office
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.