Diff between 9f1ed8439876f1d89445f4fc02ae0845532935cc and ff418f11552e286e4f1bffe2cc3bfa12794eb386
Changed Files
| File | Additions | Deletions | Status |
| obexd/plugins/pbap.c | +3 | -0 | modified |
Full Patch
diff --git a/obexd/plugins/pbap.c b/obexd/plugins/pbap.c
index 84f4a8a..36e5206 100644
--- a/obexd/plugins/pbap.c
+++ b/obexd/plugins/pbap.c
@@ -459,6 +459,9 @@ static struct apparam_field *parse_aparam(const guint8 *buffer, guint32 hlen)
param->searchattrib = hdr->val[0];
break;
case SEARCHVALUE_TAG:
+ if (hdr->len == 0)
+ goto failed;
+
param->searchval = g_try_malloc0(hdr->len + 1);
if (param->searchval)
memcpy(param->searchval, hdr->val, hdr->len);