avoid off-by-one buffer overread

This commit is contained in:
Steven Mestdagh 2018-12-17 20:40:03 +01:00 committed by GitHub
parent 6b4e9bd855
commit 9066896195
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -747,7 +747,7 @@ ParseSSDPPacket(int s, const char * p, ssize_t n,
}
}
linestart = lineend;
while((*linestart == '\n' || *linestart == '\r') && linestart < p + n)
while((linestart < p + n) && (*linestart == '\n' || *linestart == '\r'))
linestart++;
}
#if 0