diff options
author | Vlad Tsyrklevich <vtsyrklevich@chromium.org> | 2017-11-20 13:40:54 -0800 |
---|---|---|
committer | Vlad Tsyrklevich <vtsyrklevich@chromium.org> | 2017-11-20 16:36:29 -0800 |
commit | bc29863b9668f041c3d4ad48a70360c21ab38374 (patch) | |
tree | 1a82407b65abc9c1ce88ffb3b58eaa8075677cc9 /vp9/encoder/vp9_bitstream.c | |
parent | 0cc23242b035cc1c102dbeecc524592dc93cfb7d (diff) | |
download | libvpx-bc29863b9668f041c3d4ad48a70360c21ab38374.tar.gz libvpx-bc29863b9668f041c3d4ad48a70360c21ab38374.tar.bz2 libvpx-bc29863b9668f041c3d4ad48a70360c21ab38374.zip |
[CFI] Remove function pointer casts
Control Flow Integrity [1] indirect call checking verifies that function
pointers only call valid functions with a matching type signature. This
change eliminates function pointer casts to make libvpx CFI-safe.
[1] https://www.chromium.org/developers/testing/control-flow-integrity
Change-Id: I7e08522d195a43c88cda06fa20414426c8c4372c
Diffstat (limited to 'vp9/encoder/vp9_bitstream.c')
-rw-r--r-- | vp9/encoder/vp9_bitstream.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/vp9/encoder/vp9_bitstream.c b/vp9/encoder/vp9_bitstream.c index 8433f4edd..d346cd57a 100644 --- a/vp9/encoder/vp9_bitstream.c +++ b/vp9/encoder/vp9_bitstream.c @@ -919,7 +919,9 @@ int vp9_get_refresh_mask(VP9_COMP *cpi) { } } -static int encode_tile_worker(VP9_COMP *cpi, VP9BitstreamWorkerData *data) { +static int encode_tile_worker(void *arg1, void *arg2) { + VP9_COMP *cpi = (VP9_COMP *)arg1; + VP9BitstreamWorkerData *data = (VP9BitstreamWorkerData *)arg2; MACROBLOCKD *const xd = &data->xd; const int tile_row = 0; vpx_start_encode(&data->bit_writer, data->dest); @@ -995,7 +997,7 @@ static size_t encode_tiles_mt(VP9_COMP *cpi, uint8_t *data_ptr) { } worker->data1 = cpi; worker->data2 = data; - worker->hook = (VPxWorkerHook)encode_tile_worker; + worker->hook = encode_tile_worker; worker->had_error = 0; if (i < num_workers - 1) { |