Diff between c18e3bf92e048e44cbeb36846fe26a300dcc6be6 and 6f8b3544b95e21c46521ba071d16fb4ac10ae5d8
Changed Files
| File | Additions | Deletions | Status |
| src/shared/bap.c | +6 | -0 | modified |
Full Patch
diff --git a/src/shared/bap.c b/src/shared/bap.c
index 0cafb75..8869798 100644
--- a/src/shared/bap.c
+++ b/src/shared/bap.c
@@ -2261,6 +2261,12 @@ static void *ltv_merge(struct iovec *data, struct iovec *cont)
{
uint8_t delimiter = 0;
+ if (!data)
+ return NULL;
+
+ if (!cont || !cont->iov_len || !cont->iov_base)
+ return data->iov_base;
+
iov_append(data, sizeof(delimiter), &delimiter);
return iov_append(data, cont->iov_len, cont->iov_base);