#537 avp parsing failure in h350

1.8.x
closed-accepted
modules (454)
5
2012-07-06
2012-06-15
No

The server exits on h350 init with a brief complaint in log:

ERROR:h350:h350_auth_lookup_fixup: pv_parse_format failed
ERROR:core:fix_actions: fixing failed (code=-2) at cfg line 524
CRITICAL:core:fix_expr: fix_actions error
ERROR:core:main: failed to fix configuration with err code -2

In this particular case the failure happens only with debug=2 being set for non-debug build of the server and modules.
I didn't dig too hard but noticed that in h350_auth_lookup_fixup the first argument in the call pv_parse_format(&s,&model) is not properly initialized.
The patch in the attachment fixes the issue.

Discussion

    • assigned_to: nobody --> bogdan_iancu
    • status: open --> open-accepted
     
  • Hi Yaroslav,

    I understand the part with nu-initialized (s.len = strlen(s.s);) , but I do not see the purpose of the test model==NULL - pv_parse_format() return either error, either 0 (success) with a valid model.

    It cannot return with success but with a NULL model - or you found such a case ?
    checking the code of the function pv_parse_format():
    if(*el == NULL)
    return -1;
    (see line 3804)

    Regards,
    Bogdan

     
  • ping......

     
  • Hi Yaroslav,

    I partially applied your patch (covering the len calculation) - the additional testing was left over (see my previous post) -> if you there is something I missed there, please open a new ticket.

    Thanks and regards,
    Bogdan

     
    • status: open-accepted --> closed-accepted