Ethereal-dev: Re: [Ethereal-dev] Likely solution for : tcp.port == .... causes the Filtering

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Dick Gooris <gooris@xxxxxxxxxx>
Date: Sun, 18 Feb 2001 19:10:06 +0100
Gilbert, Guy,

I tried to narrow down the issue I brought up. I think I found
the code location where it hangs and created a bug-fix for it.

See the info below. Please inform me if the fix is ok with you.


File     : packet-diameter.c

Function : dissect_attribute_value_pairs();

Location : In the loop :   while (avplength > 0 ) {

Cause    : avplength = avplength - (avph.avp_length + fixAmt);
           The part : (avph.avp_length + fixAmt) is sometimes 0,
           which causes the while-loop control to never decrement,
           and causes hang.

Solution : (To be approved by you or diameter owner)

           Just before 'avplength=avplength - ...'

           /* Loop control */
           if (avph.avp_length + fixAmt == 0 ) {
                 break;
           }

           avplength=avplength - (avph.avp_length + fixAmt);

                :
                :

Best regards,

        - Dick Gooris        Hilversum,       The Netherlands