Diff between 303925b28110469ad002ac19ce0eb9c84d6aceb2 and fdb5ba2cbff3e8f1411ab188fa84b58879b92b83
Changed Files
| File | Additions | Deletions | Status |
| lib/sdp.c | +1 | -1 | modified |
Full Patch
diff --git a/lib/sdp.c b/lib/sdp.c
index 844ae0d..1565259 100644
--- a/lib/sdp.c
+++ b/lib/sdp.c
@@ -420,7 +420,7 @@ sdp_data_t *sdp_data_alloc_with_length(uint8_t dtd, const void *value,
d->unitSize += length;
if (length <= USHRT_MAX) {
- d->val.str = malloc(length);
+ d->val.str = bt_malloc0(length + 1);
if (!d->val.str) {
free(d);
return NULL;