mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-13 00:00:00 -04:00
qcacld-3.0: Avoid buffer overflow in llstats debugfs response
Currently driver does not subtract the already filled length from the max available length when it copies the number of radios to the llstats result buffer which may lead to buffer overflow. To address this issue subtract already filled length from the max available length when driver copies the number of radios. Change-Id: Ie3b93121df603bd65250f0b0a49bb049d353211d CRs-Fixed: 2969637
This commit is contained in:
parent
cabb815f20
commit
bacb646f40
1 changed files with 2 additions and 2 deletions
|
|
@ -236,8 +236,8 @@ void hdd_debugfs_process_radio_stats(struct hdd_adapter *adapter,
|
|||
|
||||
buffer = ll_stats.result;
|
||||
buffer += ll_stats.len;
|
||||
len = scnprintf(buffer, DEBUGFS_LLSTATS_BUF_SIZE,
|
||||
"\n\n===LL_STATS_RADIO: number of radios: %u===",
|
||||
len = scnprintf(buffer, DEBUGFS_LLSTATS_BUF_SIZE - ll_stats.len,
|
||||
"\n\n===LL_STATS_RADIO: number of radios: %u===",
|
||||
num_radio);
|
||||
|
||||
for (i = 0; i < num_radio; i++) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue