summaryrefslogtreecommitdiffstats
path: root/dom/media/MediaData.cpp
diff options
context:
space:
mode:
authorDan Glastonbury <dan.glastonbury@gmail.com>2018-02-20 16:16:10 -0500
committerwolfbeast <mcwerewolf@gmail.com>2018-03-14 11:02:02 +0100
commitf87d25ee403c69d4f19a910d7b18f96dd3da8d51 (patch)
tree67c7930d51eca9c60114f2ad0f1f47e9864b0591 /dom/media/MediaData.cpp
parent5babf7dc56e5d8fcd566845bbc991989a5b1c7b1 (diff)
downloadUXP-f87d25ee403c69d4f19a910d7b18f96dd3da8d51.tar
UXP-f87d25ee403c69d4f19a910d7b18f96dd3da8d51.tar.gz
UXP-f87d25ee403c69d4f19a910d7b18f96dd3da8d51.tar.lz
UXP-f87d25ee403c69d4f19a910d7b18f96dd3da8d51.tar.xz
UXP-f87d25ee403c69d4f19a910d7b18f96dd3da8d51.zip
Bug 1428947 - Check plane width & stride constraints. r=mattwoodrow, a=ritu
MozReview-Commit-ID: 328ETwMdVnq --HG-- extra : rebase_source : e16b28d137de080f9d8495c6937e24ac16b16ab1
Diffstat (limited to 'dom/media/MediaData.cpp')
-rw-r--r--dom/media/MediaData.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/dom/media/MediaData.cpp b/dom/media/MediaData.cpp
index 0439a7473..4a52c22ae 100644
--- a/dom/media/MediaData.cpp
+++ b/dom/media/MediaData.cpp
@@ -90,7 +90,7 @@ ValidatePlane(const VideoData::YCbCrBuffer::Plane& aPlane)
return aPlane.mWidth <= PlanarYCbCrImage::MAX_DIMENSION &&
aPlane.mHeight <= PlanarYCbCrImage::MAX_DIMENSION &&
aPlane.mWidth * aPlane.mHeight < MAX_VIDEO_WIDTH * MAX_VIDEO_HEIGHT &&
- aPlane.mStride > 0;
+ aPlane.mStride > 0 && aPlane.mWidth <= aPlane.mStride;
}
#ifdef MOZ_WIDGET_GONK