mirror of
https://git.openwrt.org/feed/packages.git
synced 2024-06-14 11:23:57 +02:00
de79f4c749
Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com> bluez: fix CVE-2017-1000250 Signed-off-by: Hirokazu MORIKAWA <morikw2@gmail.com>
14 lines
614 B
Diff
14 lines
614 B
Diff
diff --git a/src/sdpd-request.c b/src/sdpd-request.c
|
|
index 1eefdce..318d044 100644
|
|
--- a/src/sdpd-request.c
|
|
+++ b/src/sdpd-request.c
|
|
@@ -917,7 +917,7 @@ static int service_search_attr_req(sdp_req_t *req, sdp_buf_t *buf)
|
|
} else {
|
|
/* continuation State exists -> get from cache */
|
|
sdp_buf_t *pCache = sdp_get_cached_rsp(cstate);
|
|
- if (pCache) {
|
|
+ if (pCache && cstate->cStateValue.maxBytesSent < pCache->data_size) {
|
|
uint16_t sent = MIN(max, pCache->data_size - cstate->cStateValue.maxBytesSent);
|
|
pResponse = pCache->data;
|
|
memcpy(buf->data, pResponse + cstate->cStateValue.maxBytesSent, sent);
|