mirror of
https://github.com/status-im/miniupnp.git
synced 2025-01-22 20:29:30 +00:00
avoid off-by-one buffer overread
similar to commit 9fcc0a72f09e6e1aa46ddcc997d3dcae87d4b416
This commit is contained in:
parent
e7fa40f60b
commit
f6fc66ee41
@ -1043,7 +1043,7 @@ ProcessSSDPData(int s, const char *bufr, int n,
|
||||
{
|
||||
st = bufr+i+3;
|
||||
st_len = 0;
|
||||
while((*st == ' ' || *st == '\t') && (st < bufr + n))
|
||||
while((st < bufr + n) && (*st == ' ' || *st == '\t'))
|
||||
st++;
|
||||
while((st + st_len < bufr + n)
|
||||
&& (st[st_len]!='\r' && st[st_len]!='\n'))
|
||||
|
Loading…
x
Reference in New Issue
Block a user