mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 05:41:12 +00:00
bug 763621 - Fix a Breakpad issue, patch from upstream r792. r=upstream
--HG-- extra : rebase_source : 5f8c09fcc2172fe60b524e8e3d1026d35e7c95aa
This commit is contained in:
parent
c590a16cae
commit
03021efab7
@ -1308,6 +1308,15 @@ popline:
|
||||
if (!memory.Allocate(total))
|
||||
return false;
|
||||
for (MDRVA pos = memory.position(); buffers; buffers = buffers->next) {
|
||||
// Check for special case of a zero-length buffer. This should only
|
||||
// occur if a file's size happens to be a multiple of the buffer's
|
||||
// size, in which case the final sys_read() will have resulted in
|
||||
// zero bytes being read after the final buffer was just allocated.
|
||||
if (buffers->len == 0) {
|
||||
// This can only occur with final buffer.
|
||||
assert(buffers->next == NULL);
|
||||
continue;
|
||||
}
|
||||
memory.Copy(pos, &buffers->data, buffers->len);
|
||||
pos += buffers->len;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user