Commit f343f0db authored by Kenton Varda's avatar Kenton Varda
parent 3a717467
......@@ -685,7 +685,8 @@ struct WireHelpers {
return result;
}
KJ_REQUIRE(elementTag->structRef.wordSize() / ELEMENTS * count <= wordCount,
KJ_REQUIRE(elementTag->structRef.wordSize() / ELEMENTS *
ElementCount64(count) <= wordCount,
"Struct list pointer's elements overran size.") {
return result;
}
......@@ -1663,7 +1664,7 @@ struct WireHelpers {
ElementCount elementCount = tag->inlineCompositeListElementCount();
auto wordsPerElement = tag->structRef.wordSize() / ELEMENTS;
KJ_REQUIRE(wordsPerElement * elementCount <= wordCount,
KJ_REQUIRE(wordsPerElement * ElementCount64(elementCount) <= wordCount,
"INLINE_COMPOSITE list's elements overrun its word count.") {
goto useDefault;
}
......@@ -1919,7 +1920,7 @@ struct WireHelpers {
size = tag->inlineCompositeListElementCount();
wordsPerElement = tag->structRef.wordSize() / ELEMENTS;
KJ_REQUIRE(size * wordsPerElement <= wordCount,
KJ_REQUIRE(ElementCount64(size) * wordsPerElement <= wordCount,
"INLINE_COMPOSITE list's elements overrun its word count.") {
goto useDefault;
}
......
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