Parent: 5afa25c95e6aadd431941b410b4d5fdd44b7458a
Author: Jonas Dreßler <verdre@v0yd.nl>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2023-11-13 20:57:03
Tree: 97a328db18523daf348ce8ab79401f913ffe1ed6
lib/sdp: Pass size_t to sdp_get_string_attr() We're currently type-casting the output of strlen(sdpdata->val.str) into an int, which is somewhat problematic given that strlen() can return values larger than sizeof(int). We can do better here and use size_t instead, so let's do that. While at it, also add a comment explaining why the check here is "smaller than" instead of "smaller than or equal". Co-developed-by: Zander Brown <zbrown@gnome.org>
Diffstat
| M | lib/sdp.c | | | 21 | +++++++++++++- - - - - - - - |
| M | lib/sdp_lib.h | | | 21 | ++++++++++++++- - - - - - - |
2 files changed, 27 insertions(+), 15 deletions(-)