Commit 27bc134
[Backport] Security bug 329674887 (1/2)
Cherry-pick of patch orignally reviewed on
https://chromium-review.googlesource.com/c/webm/libvpx/+/5370376:
Fix to buffer alloc for vp9_bitstream_worker_data
The code was using the bitstream_worker_data when it
wasn't allocated for big enough size. This is because
the existing condition was to only re-alloc the
bitstream_worker_data when current dest_size was larger
than the current frame_size. But under resolution change
where frame_size is increased, beyond the current dest_size,
we need to allow re-alloc to the new size.
The existing condition to re-alloc when dest_size is
larger than frame_size (which is not required) is kept
for now.
Also increase the dest_size to account for image format.
Added tests, for both ROW_MT=0 and 1, that reproduce
the failures in the bugs below.
Note: this issue only affects the REALTIME encoding path.
Bug: b/329088759, b/329674887, b/329179808
Change-Id: Icd65dbc5317120304d803f648d4bd9405710db6f
Reviewed-on: https://codereview.qt-project.org/c/qt/qtwebengine-chromium/+/554625
Reviewed-by: Michal Klocek <[email protected]>1 parent bae0d69 commit 27bc134
File tree
1 file changed
+11
-3
lines changed- chromium/third_party/libvpx/source/libvpx/vp9/encoder
1 file changed
+11
-3
lines changedLines changed: 11 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
962 | 962 | | |
963 | 963 | | |
964 | 964 | | |
| 965 | + | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
| 971 | + | |
| 972 | + | |
965 | 973 | | |
966 | 974 | | |
967 | 975 | | |
| |||
972 | 980 | | |
973 | 981 | | |
974 | 982 | | |
975 | | - | |
| 983 | + | |
976 | 984 | | |
977 | 985 | | |
978 | 986 | | |
| |||
987 | 995 | | |
988 | 996 | | |
989 | 997 | | |
990 | | - | |
991 | | - | |
| 998 | + | |
| 999 | + | |
992 | 1000 | | |
993 | 1001 | | |
994 | 1002 | | |
| |||
0 commit comments