Bug 981393 - Crash the child process if we get invalid Compositable updates. r=nical

This commit is contained in:
Matt Woodrow 2014-03-11 11:12:49 +13:00
Родитель bf7cbaf262
Коммит 6b22cbdbb7
2 изменённых файлов: 7 добавлений и 3 удалений

Просмотреть файл

@ -86,7 +86,9 @@ ImageBridgeParent::RecvUpdate(const EditArray& aEdits, EditReplyArray* aReply)
EditReplyVector replyv;
for (EditArray::index_type i = 0; i < aEdits.Length(); ++i) {
ReceiveCompositableUpdate(aEdits[i], replyv);
if (!ReceiveCompositableUpdate(aEdits[i], replyv)) {
return false;
}
}
aReply->SetCapacity(replyv.size());

Просмотреть файл

@ -495,8 +495,10 @@ LayerTransactionParent::RecvUpdate(const InfallibleTArray<Edit>& cset,
break;
}
case Edit::TCompositableOperation: {
ReceiveCompositableUpdate(edit.get_CompositableOperation(),
replyv);
if (!ReceiveCompositableUpdate(edit.get_CompositableOperation(),
replyv)) {
return false;
}
break;
}
case Edit::TOpAttachCompositable: {