Parent: d328abaa1715d3d8df05b06a2e09429fcdeebe34
Author: Ildar Kamaletdinov <i.kamaletdinov@omp.ru>
Committer: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Date: 2022-04-04 19:41:59
Tree: 20686994b095c36b5814ff2d19ac521248b9f15f
tools: Fix signed integer overflow in btsnoop.c If malformed packet is proceed with zero 'size' field we will face with wrong behaviour of write() call. Value 'toread - 1' gives wrong sign for value 'written' (-1) in write() call. To prevent this we should check that 'toread' is not equal to zero. Found by Linux Verification Center (linuxtesting.org) with the SVACE static analysis tool.
Diffstat
| M | tools/btsnoop.c | | | 2 | +- |
1 files changed, 1 insertions(+), 1 deletions(-)