diff options
| author | Anurag Chouhan <achouhan@codeaurora.org> | 2018-09-19 13:15:13 +0530 |
|---|---|---|
| committer | Anurag Chouhan <achouhan@codeaurora.org> | 2018-09-20 11:58:08 +0530 |
| commit | 708d96ef1bc028e36cb6cfc51dad1b1384629637 (patch) | |
| tree | ff76e486086f6295286598e5c25e7a8af6858aca /include/net | |
| parent | 727593cbf7ebb6782b2b3b45a951cc8ccc03a788 (diff) | |
wcnss: Fix buffer overflow in wcnss_prealloc_get
There is potential integer truncation in the wcnss_prealloc_get api.
size_t is 8 byte on x64 platform and "unsigned int" is 4 byte.
To avoid this integer truncation, pass size as size_t instead
of unsigned int.
CRs-Fixed: 2269610
Change-Id: I14b274dd7cad98b55fdce1aaa27783272231afde
Signed-off-by: Anurag Chouhan <achouhan@codeaurora.org>
Diffstat (limited to 'include/net')
| -rw-r--r-- | include/net/cnss_prealloc.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/cnss_prealloc.h b/include/net/cnss_prealloc.h index 734b4b69ecbb..39d080a8b184 100644 --- a/include/net/cnss_prealloc.h +++ b/include/net/cnss_prealloc.h @@ -1,4 +1,4 @@ -/* Copyright (c) 2015, The Linux Foundation. All rights reserved. +/* Copyright (c) 2015-2018, The Linux Foundation. All rights reserved. * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 and @@ -15,7 +15,7 @@ #define WCNSS_PRE_ALLOC_GET_THRESHOLD (4*1024) -extern void *wcnss_prealloc_get(unsigned int size); +extern void *wcnss_prealloc_get(size_t size); extern int wcnss_prealloc_put(void *ptr); extern int wcnss_pre_alloc_reset(void); void wcnss_prealloc_check_memory_leak(void); |
