mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
qcacld-3.0: Add zero to the end of the buffer
when wlan_mac.bin doesn’t end with ‘\0’, get_next_line() can access the unexpected area. Fix this by adding 0 to the end of the buffer. Change-Id: I01971aa5ad9679338a19e837f73969367d5b08f8 CRs-Fixed: 2026925
This commit is contained in:
parent
0c1b59479d
commit
e6b465b3c2
1 changed files with 2 additions and 1 deletions
|
|
@ -5805,7 +5805,7 @@ QDF_STATUS hdd_update_mac_config(hdd_context_t *pHddCtx)
|
|||
|
||||
hdd_debug("wlan_mac.bin size %zu", fw->size);
|
||||
|
||||
temp = qdf_mem_malloc(fw->size);
|
||||
temp = qdf_mem_malloc(fw->size + 1);
|
||||
|
||||
if (temp == NULL) {
|
||||
hdd_err("fail to alloc memory");
|
||||
|
|
@ -5814,6 +5814,7 @@ QDF_STATUS hdd_update_mac_config(hdd_context_t *pHddCtx)
|
|||
}
|
||||
buffer = temp;
|
||||
qdf_mem_copy(buffer, fw->data, fw->size);
|
||||
buffer[fw->size + 1] = 0x0;
|
||||
|
||||
/* data format:
|
||||
* Intf0MacAddress=00AA00BB00CC
|
||||
|
|
|
|||
Loading…
Reference in a new issue