Commit 55eb5c73 authored by Albert Astals Cid's avatar Albert Astals Cid

BaseMemStream::getChars: If we're past the end do nothing

parent c09f01b1
......@@ -694,7 +694,10 @@ private:
{
int n;
if (nChars <= 0) {
if (unlikely(nChars <= 0)) {
return 0;
}
if (unlikely(bufPtr >= bufEnd)) {
return 0;
}
if (bufEnd - bufPtr < nChars) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment