mirror of
https://git.FreeBSD.org/src.git
synced 2025-01-14 14:55:41 +00:00
Fix bug in handling SDP continuation state.
Reported by: Eric Millbrandt emillbrandt at coldhaus dot com MFC after: 3 days
This commit is contained in:
parent
0e0d8d5a75
commit
1f3e4b39fd
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=173673
@ -204,15 +204,18 @@ sdp_search(void *xss,
|
||||
return (-1);
|
||||
}
|
||||
|
||||
rsp += xpdu.len;
|
||||
ss->tid ++;
|
||||
|
||||
/* Save continuation state (if any) */
|
||||
ss->cslen = rsp[xpdu.len];
|
||||
ss->cslen = rsp[0];
|
||||
if (ss->cslen > 0) {
|
||||
if (ss->cslen > sizeof(ss->cs)) {
|
||||
ss->error = ENOBUFS;
|
||||
return (-1);
|
||||
}
|
||||
|
||||
memcpy(ss->cs, rsp + xpdu.len + 1, ss->cslen);
|
||||
memcpy(ss->cs, rsp + 1, ss->cslen);
|
||||
|
||||
/*
|
||||
* Ensure that we always have ss->imtu bytes
|
||||
@ -236,9 +239,6 @@ sdp_search(void *xss,
|
||||
rsp = ss->rsp + offset;
|
||||
}
|
||||
}
|
||||
|
||||
rsp += xpdu.len;
|
||||
ss->tid ++;
|
||||
} while (ss->cslen > 0);
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user