mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 07:03:09 -04:00
qcacld-3.0: Buffer overflow in setrmcenable, setrmcactionperiod
There is a buffer overflow while using sscanf in setrmcenable and setrmcactionperiod APIs. To resolve this, use sscanf according to buffer length. Change-Id: I91b0c36cb8c67d45afb0b95ac944f9e87187f85a CRs-Fixed: 2086337
This commit is contained in:
parent
df295ba6b3
commit
9cd0d7c74f
1 changed files with 2 additions and 2 deletions
|
|
@ -234,7 +234,7 @@ static int hdd_parse_setrmcenable_command(uint8_t *pValue,
|
|||
if ('\0' == *inPtr)
|
||||
return 0;
|
||||
|
||||
v = sscanf(inPtr, "%32s ", buf);
|
||||
v = sscanf(inPtr, "%31s ", buf);
|
||||
if (1 != v)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
@ -272,7 +272,7 @@ static int hdd_parse_setrmcactionperiod_command(uint8_t *pValue,
|
|||
if ('\0' == *inPtr)
|
||||
return 0;
|
||||
|
||||
v = sscanf(inPtr, "%32s ", buf);
|
||||
v = sscanf(inPtr, "%31s ", buf);
|
||||
if (1 != v)
|
||||
return -EINVAL;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue