Use a checked type that allows us to automate bound checks. We use a non-recording Checked<> to keep the behavior.
Created attachment 207813 [details] Patch
Comment on attachment 207813 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=207813&action=review > Source/WebCore/platform/audio/AudioArray.h:55 > void allocate(size_t n) Make n Checked<size_t>, otherwise the multiplication below may silently fail before the arithmetic becomes safe.
Created attachment 207886 [details] Patch
(In reply to comment #2) > Make n Checked<size_t>, otherwise the multiplication below may silently fail before the arithmetic becomes safe. Done. Thanks for the review.
Committed r153548: <http://trac.webkit.org/changeset/153548>
Comment on attachment 207886 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=207886&action=review > Source/WebCore/platform/audio/AudioArray.h:55 > + void allocate(Checked<size_t> n) I think itβs not good to make <n> itself a Checked. There must be a better way to make the initialSize computation be checked.