avoid off-by-one buffer overread

similar to commit 9fcc0a72f0
This commit is contained in:
Steven Mestdagh 2018-12-06 00:11:21 +01:00 committed by GitHub
parent e7fa40f60b
commit f6fc66ee41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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'))