qcacld-2.0: Avoid integer underflow in dot11f_unpack functions

propagation from qcacld-3.0 to qcacld-2.0

In function dot11f_unpack functions length of buffer passed is
decremented as pointer advances in the buffer. Add a check for
integer underflow before decrementing the length.

qcacld-3.0 to CLD2.0 propagation of the following CRs:
2237141, 2231755, 2246426, 2150438

Change-Id: I4ed39d326855c2027ff0bc3cbe5c8981a2ae2aa1
CRs-Fixed: 2259649
This commit is contained in:
Qun Zhang 2018-06-19 13:08:22 +08:00 committed by syphyr
parent 8d339d40b8
commit 3d392c86e6
2 changed files with 1927 additions and 2 deletions

View File

@ -36,7 +36,7 @@
*
*
* This file was automatically generated by 'framesc'
* Thu Dec 28 13:33:15 2017 from the following file(s):
* Wed Jun 20 14:32:20 2018 from the following file(s):
*
* dot11f.frms
*
@ -55,6 +55,10 @@ typedef tANI_U32 tDOT11F_U64[2];
# pragma warning (disable: 4214) /* nonstandard extension used */
#endif /* Microsoft C/C++ bit field types other than int */
#if !defined unlikely
#define unlikely(x) (x)
#endif
/*
* Frames Return Codes:
*