Commit: 1e22fd9adbb3283f1a081b94248e97b662256d54
Parent: d3fcc77f99da755bb364c491f71638358bdd5f09
Author: Bastien Nocera <hadess@hadess.net>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2024-05-10 18:25:08
Tree: 97b9ef4177d9cb4449043820a5798ff5c60a27b3

attrib/gatt: Guard against possible integer overflow Error: INTEGER_OVERFLOW (CWE-190): [#def30] attrib/gatt.c:1016:2: known_value_assign: "last" = "65535", its value is now 65535. attrib/gatt.c:1087:2: overflow_const: Expression "dd->start", which is equal to 65536, where "last + 1" is known to be equal to 65536, overflows the type that receives it, an unsigned integer 16 bits wide. 1085| } 1086| 1087|-> dd->start = last + 1; 1088| 1089| if (last < dd->end && !uuid_found) {

Diffstat

M attrib/gatt.c | 8 +++++- - -

1 files changed, 5 insertions(+), 3 deletions(-)

View Full Diff | Patch