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.
Fixes: CVE-2021-30353
Upstream commit: https://source.codeaurora.org/quic/le/platform/hardware/qcom/audio/commit/?id=af30f0103a50df510a71a12047b5c68b4e3b8a72
Change-Id: I92ccb0871b09f5757195844984519d51367ed35f
diff --git a/hal/acdb.h b/hal/acdb.h
index e6410d6..718331b 100644
--- a/hal/acdb.h
+++ b/hal/acdb.h
@@ -26,7 +26,7 @@
#define ACDB_METAINFO_KEY_MODULE_NAME_LEN 100
/* Audio calibration related functions */
-typedef void (*acdb_deallocate_t)();
+typedef void (*acdb_deallocate_t)(void);
typedef int (*acdb_init_v3_t)(const char *, char *, struct listnode *);
typedef int (*acdb_init_v2_cvd_t)(char *, char *, int);
typedef int (*acdb_init_v2_t)(char *);
diff --git a/hal/msm8960/platform.c b/hal/msm8960/platform.c
index 6cc5411..913fb00 100644
--- a/hal/msm8960/platform.c
+++ b/hal/msm8960/platform.c
@@ -60,7 +60,7 @@
};
-typedef void (*acdb_deallocate_t)();
+typedef void (*acdb_deallocate_t)(void);
typedef int (*acdb_init_t)();
typedef void (*acdb_send_audio_cal_t)(int, int);
typedef void (*acdb_send_voice_cal_t)(int, int);