mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-18 06:49:53 +02:00
[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 that were causing cfi-icall failures. [1] https://www.chromium.org/developers/testing/control-flow-integrity BUG=chromium:827826 Change-Id: I5db021d06390a6cefd670fdd2f0d34c9e530465e
This commit is contained in:
committed by
James Zern
parent
c909d53182
commit
978eec2507
@ -361,7 +361,8 @@ static int EncodeAlpha(VP8Encoder* const enc,
|
||||
//------------------------------------------------------------------------------
|
||||
// Main calls
|
||||
|
||||
static int CompressAlphaJob(VP8Encoder* const enc, void* dummy) {
|
||||
static int CompressAlphaJob(void* arg1, void* dummy) {
|
||||
VP8Encoder* const enc = (VP8Encoder*)arg1;
|
||||
const WebPConfig* config = enc->config_;
|
||||
uint8_t* alpha_data = NULL;
|
||||
size_t alpha_size = 0;
|
||||
@ -394,7 +395,7 @@ void VP8EncInitAlpha(VP8Encoder* const enc) {
|
||||
WebPGetWorkerInterface()->Init(worker);
|
||||
worker->data1 = enc;
|
||||
worker->data2 = NULL;
|
||||
worker->hook = (WebPWorkerHook)CompressAlphaJob;
|
||||
worker->hook = CompressAlphaJob;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user