[OpenSIPS-Devel] [OpenSIPS/opensips] 4545e5: event_rabbitmq: fix dupl_string() NUL-inclusive le...
Norm Brandinger
noreply at github.com
Fri Apr 17 12:34:42 UTC 2026
Branch: refs/heads/3.6
Home: https://github.com/OpenSIPS/opensips
Commit: 4545e55960a6e069d2ab942a0594c1add0a5eddf
https://github.com/OpenSIPS/opensips/commit/4545e55960a6e069d2ab942a0594c1add0a5eddf
Author: Norm Brandinger <n.brandinger at gmail.com>
Date: 2026-04-17 (Fri, 17 Apr 2026)
Changed paths:
M modules/event_rabbitmq/event_rabbitmq.c
Log Message:
-----------
event_rabbitmq: fix dupl_string() NUL-inclusive len corrupting AMQP shortstr (#3834)
dupl_string() incremented dst->len after NUL-terminating the unescaped
string, causing .len to include the trailing NUL byte. This made
amqp_basic_publish() encode exchange and routing-key shortstr fields
with an extra 0x00, breaking broker routing.
Remove the len++ and all downstream compensations (tls_dom_name.len--,
and the - 1 adjustments in rmq_print() for address, exchange, routing
key, and user). Also fix the un_escape() error path to free the
already-allocated shm buffer, and fix the default-user allocation to
explicitly NUL-terminate.
Closes #3828
(cherry picked from commit cc801a4e01cd9ee7c21b0d34d9b7a7aa32f6c3a3)
To unsubscribe from these emails, change your notification settings at https://github.com/OpenSIPS/opensips/settings/notifications
More information about the Devel
mailing list