device: Limit width of fields in sscanf
authorIldar Kamaletdinov <i.kamaletdinov@omp.ru>
Fri, 1 Apr 2022 12:16:46 +0000 (15:16 +0300)
committerAyush Garg <ayush.garg@samsung.com>
Mon, 15 May 2023 09:25:54 +0000 (14:55 +0530)
commit4645f0b24d95f09185a8df4074335fc66dc1f92b
tree5709c912bb30c6a7350548f5642a6b93bf05e0d3
parent1d486069b2c720608963314305308204f82430dc
device: Limit width of fields in sscanf

In src/device.c few sscanf does not limit width of uuid field. This
could lead to static overflow and stack corruption.

Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.

Signed-off-by: Manika Shrivastava <manika.sh@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
src/device.c