202-CVE-2017-1000250.patch 614 B

12345678910111213
  1. diff --git a/src/sdpd-request.c b/src/sdpd-request.c
  2. index 1eefdce..318d044 100644
  3. --- a/src/sdpd-request.c
  4. +++ b/src/sdpd-request.c
  5. @@ -917,7 +917,7 @@ static int service_search_attr_req(sdp_req_t *req, sdp_buf_t *buf)
  6. } else {
  7. /* continuation State exists -> get from cache */
  8. sdp_buf_t *pCache = sdp_get_cached_rsp(cstate);
  9. - if (pCache) {
  10. + if (pCache && cstate->cStateValue.maxBytesSent < pCache->data_size) {
  11. uint16_t sent = MIN(max, pCache->data_size - cstate->cStateValue.maxBytesSent);
  12. pResponse = pCache->data;
  13. memcpy(buf->data, pResponse + cstate->cStateValue.maxBytesSent, sent);