diff options
author | Sujin Panicker <spanic@codeaurora.org> | 2021-07-14 15:04:43 +0530 |
---|---|---|
committer | Gerrit - the friendly Code Review server <code-review@localhost> | 2021-08-04 05:34:17 -0700 |
commit | af30f0103a50df510a71a12047b5c68b4e3b8a72 (patch) | |
tree | 05a0e93c4ce0cebd611c060474809215a30527f0 | |
parent | 10c9f5ceb22eafc7073124b5d9ed16307e6fb496 (diff) |
hal: Fix CFI errors
CFI check is failing due to difference in
function signature during CVE-2019-10581
POC test. Fix the issue by matching the
function signature in header file and
function pointer type.
Change-Id: I92ccb0871b09f5757195844984519d51367ed35f
-rw-r--r-- | hal/acdb.h | 4 | ||||
-rw-r--r-- | hal/audio_extn/a2dp.c | 2 | ||||
-rw-r--r-- | hal/audio_extn/audio_extn.c | 4 | ||||
-rw-r--r-- | hal/audio_extn/battery_listener.h | 6 |
4 files changed, 8 insertions, 8 deletions
@@ -1,5 +1,5 @@ /* - * Copyright (c) 2013-2020, The Linux Foundation. All rights reserved. + * Copyright (c) 2013-2021, The Linux Foundation. All rights reserved. * Not a Contribution. * * Copyright (C) 2013 The Android Open Source Project @@ -41,7 +41,7 @@ enum { struct mixer; /* Audio calibration related functions */ -typedef void (*acdb_deallocate_t)(); +typedef void (*acdb_deallocate_t)(void); typedef int (*acdb_init_t)(); typedef int (*acdb_init_v2_t)(const char *, char *, int); typedef int (*acdb_init_v3_t)(const char *, char *, struct listnode *); diff --git a/hal/audio_extn/a2dp.c b/hal/audio_extn/a2dp.c index cade8cdb..e960c6ad 100644 --- a/hal/audio_extn/a2dp.c +++ b/hal/audio_extn/a2dp.c @@ -155,7 +155,7 @@ static void *vndk_fwk_lib_handle = NULL; static int is_running_with_enhanced_fwk = UNINITIALIZED; -typedef int (*vndk_fwk_isVendorEnhancedFwk_t)(); +typedef int (*vndk_fwk_isVendorEnhancedFwk_t)(void); static vndk_fwk_isVendorEnhancedFwk_t vndk_fwk_isVendorEnhancedFwk; /* diff --git a/hal/audio_extn/audio_extn.c b/hal/audio_extn/audio_extn.c index 3fdeb9b5..629e2e35 100644 --- a/hal/audio_extn/audio_extn.c +++ b/hal/audio_extn/audio_extn.c @@ -5573,10 +5573,10 @@ static void *batt_listener_lib_handle = NULL; typedef void (*batt_listener_init_t)(battery_status_change_fn_t); static batt_listener_init_t batt_listener_init; -typedef void (*batt_listener_deinit_t)(); +typedef void (*batt_listener_deinit_t)(void); static batt_listener_deinit_t batt_listener_deinit; -typedef bool (*batt_prop_is_charging_t)(); +typedef bool (*batt_prop_is_charging_t)(void); static batt_prop_is_charging_t batt_prop_is_charging; void battery_listener_feature_init(bool is_feature_enabled) diff --git a/hal/audio_extn/battery_listener.h b/hal/audio_extn/battery_listener.h index a34b3581..5bf17788 100644 --- a/hal/audio_extn/battery_listener.h +++ b/hal/audio_extn/battery_listener.h @@ -1,5 +1,5 @@ /* -* Copyright (c) 2019, The Linux Foundation. All rights reserved. +* Copyright (c) 2019, 2021 The Linux Foundation. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -31,8 +31,8 @@ extern "C" { #endif typedef void (* battery_status_change_fn_t)(bool); void battery_properties_listener_init(battery_status_change_fn_t fn); -void battery_properties_listener_deinit(); -bool battery_properties_is_charging(); +void battery_properties_listener_deinit(void); +bool battery_properties_is_charging(void); #ifdef __cplusplus } #endif |