Commit: fdb5ba2cbff3e8f1411ab188fa84b58879b92b83
Parent: 303925b28110469ad002ac19ce0eb9c84d6aceb2
Author: Jonas Dreßler <verdre@v0yd.nl>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2023-11-13 20:29:54
Tree: f726daa3d25665ff55c9153a3df46aa95e83df8c

lib/sdp: Allocate strings in sdp_data_t with NULL termination In extract_str() we create sdp_data_t with strings and allocate sdp_data_t->val.str an extra 0-byte as NULL termination. In sdp_data_alloc_with_length() we're missing this, and strlen() in sdp_get_string_attr() ends up overrunning the sdpdata->val.str buffer looking for the NULL termination. Allocate the extra 0-byte for sdp_data_t->val.str to ensure this overrun can't happen. Co-developed-by: Zander Brown <zbrown@gnome.org>

Diffstat

M lib/sdp.c | 2 +-

1 files changed, 1 insertions(+), 1 deletions(-)

View Full Diff | Patch