diff options
author | Ben Fennema <fennema@google.com> | 2016-11-22 18:44:01 +0000 |
---|---|---|
committer | Android Partner Code Review <android-gerrit-partner@google.com> | 2016-11-22 18:44:01 +0000 |
commit | 36b716a02663ec35d140ff28d4ec889cf65e3bf4 (patch) | |
tree | 2483c6def2eea2ce3d50cc392e5c6da46d7c4056 | |
parent | 43e6d2221b0016228757e5ac1e79f810d767d67a (diff) | |
parent | 79b5b4a757479816910ff5d9f67638f6a4a8bad1 (diff) | |
download | mediatek-36b716a02663ec35d140ff28d4ec889cf65e3bf4.tar.gz |
Merge "FHCTL : Fix security issue" into android-mediatek-pike-3.10
-rw-r--r-- | arch/arm/mach-mt2601/mt_freqhopping.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/arch/arm/mach-mt2601/mt_freqhopping.c b/arch/arm/mach-mt2601/mt_freqhopping.c index 5dee9c47025f..5f8b7a189f66 100644 --- a/arch/arm/mach-mt2601/mt_freqhopping.c +++ b/arch/arm/mach-mt2601/mt_freqhopping.c @@ -715,6 +715,11 @@ static INT32 freqhop_proc_dbg_write(struct file *file, const char *buffer, size_ } break; case 2:{ /* - config hopping => 2 x pll_id dds hop_dds 0 0 */ + if (p3 >= NUM_OF_PLL_ID) { + fhctl_err("pll_id index out of range %x\n",p3); + count = -1; + break; + } /* - disable FIRST */ freqhop_fhctlx_disable(p3, FHCTL_HOPPING, 1); if (p2 == 0) { /* - disable */ @@ -727,6 +732,11 @@ static INT32 freqhop_proc_dbg_write(struct file *file, const char *buffer, size_ } break; case 3:{ /* - config SSC => 3 x pll_id dds ssc_df ssc_dt uplmt dnlmt */ + if (p3 >= NUM_OF_PLL_ID) { + fhctl_err("pll_id index out of range %x\n",p3); + count = -1; + break; + } if (p2 == 0) { /* - disable FIRST */ freqhop_fhctlx_disable(p3, FHCTL_SSC, 1); } else if (p2 == 1) { /* - enable, but disable FIRST */ |