avoid off-by-one buffer overread
This commit is contained in:
parent
6b4e9bd855
commit
9066896195
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue