summaryrefslogtreecommitdiff
path: root/include/linux/compiler.h
diff options
context:
space:
mode:
authorPragaspathi Thilagaraj <tpragasp@codeaurora.org>2019-11-21 20:39:21 +0530
committerPragaspathi Thilagaraj <tpragasp@codeaurora.org>2019-11-21 21:04:22 +0530
commit0717277fd4af12703f3a6467a9715955404c68f2 (patch)
tree515bc42bfaadcbca03c1dd3c3841f0553d184ffc /include/linux/compiler.h
parentd263f808e074937056de3dffe74904832440fa5d (diff)
qcacmn: Fix zero size malloc when memory debug is disabled
In SLUB disabled builds, the qdf_mem_malloc calls the qdf_mem_malloc_fl function which doesn't validate if the size provided is 0 and returns the value ZERO_SIZE_PTR(((void *)16)) for the pointer. When this pointer is dereferenced, it causes invalid address dereference. Validate if the size parameter provided to qdf_mem_malloc is 0 or greater than QDF_MEM_MAX_MALLOC. Return failure if the validation fails. Change-Id: I8fc6bc796847e9dd3dfd5186b0386d323560d0cf CRs-Fixed: 2571505
Diffstat (limited to 'include/linux/compiler.h')
0 files changed, 0 insertions, 0 deletions