Skip to content

[BUG] OpenSIPS 3.6.3: AMQP shortstr length includes trailing NUL (exchange ends with \x00) #3828

@kertorffoto-dot

Description

@kertorffoto-dot

OpenSIPS version you are running

3.6.3~20260210~0e56b0ca4-1

Describe the bug

After upgrading a test registrar to OpenSIPS 3.6.3, EVI events published via event_rabbitmq started to fail routing in RabbitMQ. Packet captures show the exchange is encoded as an AMQP shortstr with length +1, causing a trailing NUL byte (\x00) to be included in the value (e.g., events.topic.name\x00). The same configuration on PROD (older OpenSIPS build) publishes without the extra NUL.

I am using code:

subscribe_event("E_REG_STAT", "rabbitmq:user:pass@1.1.1.1:5672/exchange=events.user.reg?");

On 3.3 OpenSIPS pass this in rmq packet - it is correct:

events.user.reg\x00\x00\xce

On 3.6.3 OpenSIPS pass this in rmq packet - it is broken:

events.user.reg\x00\x00\x01\xce

Possible problem is here in "modules/event_rabbitmq/event_rabbitmq.c":

dst->s[dst->len] = 0;
dst->len++;          /* <----- HERE */

To Reproduce

Just use 3.6.3~20260210~0e56b0ca4-1 and example of above 'subscribe_event()'

Expected behavior

On 3.6.3~20260210~0e56b0ca4-1 should work in same way, that it happened on 3.3.

Relevant System Logs

OS/environment information

  • Operating System:
  • OpenSIPS installation:
  • other relevant information:

Additional context

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions