mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-12-02 07:24:51 +00:00
`sofia_dialog_probe_callback()` filled its fixed 512-byte `remote_display_buf` with unbounded `strcpy`. On the default path the source is the stored To-header user part, which `sip_dialogs.sip_to_user` holds verbatim from the wire with no truncation, so a dialog row addressed to a user part longer than 511 bytes overflowed the buffer when a `dialog`-package SUBSCRIBE ran the probe. Copy with `snprintf()` bounded by `sizeof(remote_display_buf)` on every path that writes it. The four proto branches write short fixed strings and could not overflow; they are converted for consistency. User parts under 512 bytes are copied unchanged.