]> git.ipfire.org Git - thirdparty/systemd.git/commit
udev: fix codesonar warnings
authorAmitanand.Chikorde <amitanand.chikorde@kpit.com>
Thu, 30 Jul 2020 13:18:48 +0000 (18:48 +0530)
committerLennart Poettering <lennart@poettering.net>
Thu, 30 Jul 2020 16:55:50 +0000 (18:55 +0200)
commite7e954243a17cceb5278aac6249ee0dcc119b1eb
tree7f770042355eb430db17ca54e625adf955e1b8c8
parentb67ec8e5b2e1a74d7e9a3a2b3ac60b7b2e39d4ea
udev: fix codesonar warnings

Fixed below systemd codesonar warning.
isprint() is invoked here with an argument of signed
type char, but only has defined behavior for int arguments that are
either representable as unsigned char or equal to the value
of macro EOF(-1).

As per codesonar report, in a number of libc implementations, isprint()
function implemented using lookup tables (arrays): passing in a
negative value can result in a read underrun.
src/udev/udevadm-info.c