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.
/* skip nonprintable attributes */
len = strlen(value);
- while (len > 0 && isprint(value[len-1]))
+ while (len > 0 && isprint((unsigned char) value[len-1]))
len--;
if (len > 0)
continue;